/*==============================================================*/
/* DBMS name:      ORACLE Version 9i                            */
/* Created on:     2009-10-27 15:23:45                          */
/*==============================================================*/



-- Type package declaration
create or replace package PDTypes  
as
    TYPE ref_cursor IS REF CURSOR;
end;

-- Integrity package declaration
create or replace package IntegrityPackage AS
 procedure InitNestLevel;
 function GetNestLevel return number;
 procedure NextNestLevel;
 procedure PreviousNestLevel;
 end IntegrityPackage;
/

-- Integrity package definition
create or replace package body IntegrityPackage AS
 NestLevel number;

-- Procedure to initialize the trigger nest level
 procedure InitNestLevel is
 begin
 NestLevel := 0;
 end;


-- Function to return the trigger nest level
 function GetNestLevel return number is
 begin
 if NestLevel is null then
     NestLevel := 0;
 end if;
 return(NestLevel);
 end;

-- Procedure to increase the trigger nest level
 procedure NextNestLevel is
 begin
 if NestLevel is null then
     NestLevel := 0;
 end if;
 NestLevel := NestLevel + 1;
 end;

-- Procedure to decrease the trigger nest level
 procedure PreviousNestLevel is
 begin
 NestLevel := NestLevel - 1;
 end;

 end IntegrityPackage;
/


drop trigger tib_cs_emp_dimission
/

drop trigger tib_cs_emplsocial
/

drop trigger tib_cs_empposition_his
/

drop trigger tib_cs_empsocial_result
/

drop trigger tib_cs_orgchart
/

drop trigger tib_cs_orgemp_his
/

drop trigger tib_cs_pay_input
/

drop trigger tib_cs_social_detail
/

drop trigger tib_excel_interface_detail
/

drop trigger tib_excel_public_detail
/

drop trigger tib_excel_public_type
/

drop trigger tib_flow_runinfo
/

drop trigger tib_pay_class_his
/

drop trigger tib_pay_classitem_limitdate
/

drop trigger tib_pay_data
/

drop trigger tib_pay_empdata
/

drop trigger tib_pay_log
/

drop trigger tib_pb_city
/

drop trigger tib_pb_company_linkman
/

drop trigger tib_pb_company_modify
/

drop trigger tib_pb_empbankcard
/

drop trigger tib_pb_province
/

drop trigger tib_pb_social_detail
/

drop trigger tib_pb_social_type
/

drop trigger tib_pb_sysfunction
/

drop trigger tib_pb_sysparm_detail
/

drop table cs_account cascade constraints
/

drop table cs_emp_account cascade constraints
/

drop table cs_emp_dimission cascade constraints
/

drop table cs_emplsocial cascade constraints
/

drop table cs_empposition_his cascade constraints
/

drop table cs_empsocial_result cascade constraints
/

drop table cs_empsocial_result_his cascade constraints
/

drop table cs_end cascade constraints
/

drop table cs_org_emp cascade constraints
/

drop table cs_orgchart cascade constraints
/

drop table cs_orgemp_his cascade constraints
/

drop table cs_pay_input cascade constraints
/

drop table cs_pay_input_his cascade constraints
/

drop table cs_position cascade constraints
/

drop table cs_position_emp cascade constraints
/

drop table cs_product cascade constraints
/

drop table cs_role cascade constraints
/

drop table cs_seckey cascade constraints
/

drop table cs_social cascade constraints
/

drop table cs_social_detail cascade constraints
/

drop table excel_interface_detail cascade constraints
/

drop table excel_interface_master cascade constraints
/

drop table excel_public_detail cascade constraints
/

drop table excel_public_master cascade constraints
/

drop table excel_public_type cascade constraints
/

drop table flow_instance cascade constraints
/

drop table flow_master cascade constraints
/

drop table flow_orgchart cascade constraints
/

drop table flow_role cascade constraints
/

drop table flow_roleuser cascade constraints
/

drop table flow_runinfo cascade constraints
/

drop table flow_runnext cascade constraints
/

drop table flow_step cascade constraints
/

drop table flow_steprun cascade constraints
/

drop table flow_user cascade constraints
/

drop table imp_table cascade constraints
/

drop table pay_class cascade constraints
/

drop table pay_class_his cascade constraints
/

drop table pay_classitem cascade constraints
/

drop table pay_classitem_his cascade constraints
/

drop table pay_classitem_limitdate cascade constraints
/

drop table pay_classitem_limitdate_his cascade constraints
/

drop table pay_data cascade constraints
/

drop table pay_empdata cascade constraints
/

drop table pay_empdata_his cascade constraints
/

drop table pay_log cascade constraints
/

drop table pay_sumclass cascade constraints
/

drop table pay_sumclass_his cascade constraints
/

drop table pb_city cascade constraints
/

drop table pb_commsocial_detail cascade constraints
/

drop table pb_commsocial_master cascade constraints
/

drop table pb_company cascade constraints
/

drop table pb_company_linkman cascade constraints
/

drop table pb_company_modify cascade constraints
/

drop table pb_csnode cascade constraints
/

drop table pb_empaccfundcard cascade constraints
/

drop table pb_empbankcard cascade constraints
/

drop table pb_employee cascade constraints
/

drop table pb_empsoccard cascade constraints
/

drop table pb_product cascade constraints
/

drop table pb_productseckey cascade constraints
/

drop table pb_province cascade constraints
/

drop table pb_secgroup cascade constraints
/

drop table pb_seckey cascade constraints
/

drop table pb_social_detail cascade constraints
/

drop table pb_social_master cascade constraints
/

drop table pb_social_type cascade constraints
/

drop table pb_sysfunction cascade constraints
/

drop table pb_sysparm_detail cascade constraints
/

drop table pb_sysparm_master cascade constraints
/

drop table tmp_employee cascade constraints
/

drop table tmp_pay_import cascade constraints
/

drop table tmp_socail_import cascade constraints
/

drop sequence GENERAL
/

drop sequence seq_bankcard
/

drop sequence seq_commsocial_master
/

drop sequence seq_cs_companyemp_his
/

drop sequence seq_cs_companyemp_parameters
/

drop sequence seq_cs_emplsocial
/

drop sequence seq_cs_emplsocial_his
/

drop sequence seq_cs_empposition_his
/

drop sequence seq_cs_empsocial_result
/

drop sequence seq_cs_orgchart
/

drop sequence seq_cs_orgemp_his
/

drop sequence seq_cs_social
/

drop sequence seq_cs_social_detail
/

drop sequence seq_csemp_dimission
/

drop sequence seq_employee
/

drop sequence seq_excel_interface_detail
/

drop sequence seq_excel_interface_master
/

drop sequence seq_excel_public_detail
/

drop sequence seq_excel_publictype
/

drop sequence seq_flow_instance
/

drop sequence seq_flow_runinfo
/

drop sequence seq_flow_runnext
/

drop sequence seq_pay_class
/

drop sequence seq_pay_class_his
/

drop sequence seq_pay_classitem
/

drop sequence seq_pay_classitem_limitdate
/

drop sequence seq_pay_data
/

drop sequence seq_pay_empdata
/

drop sequence seq_pay_input
/

drop sequence seq_pay_item
/

drop sequence seq_pay_log
/

drop sequence seq_pb_city
/

drop sequence seq_pb_company_linkman
/

drop sequence seq_pb_company_modify
/

drop sequence seq_pb_parameter
/

drop sequence seq_pb_province
/

drop sequence seq_pb_seckey
/

drop sequence seq_pb_sysparm_detail
/

drop sequence seq_pb_sysparm_master
/

drop sequence seq_pb_user_seckey
/

drop sequence seq_social_detail
/

drop sequence seq_social_master
/

drop sequence seq_social_type
/

drop sequence seq_sysfunction
/

create sequence GENERAL
increment by 1
start with 1
 nominvalue
/

create sequence seq_bankcard
increment by 1
start with 1
 nominvalue
/

create sequence seq_commsocial_master
increment by 5
start with 10000
 nominvalue
/

create sequence seq_cs_companyemp_his
start with 0000000001
increment by 1
 nominvalue
/

create sequence seq_cs_companyemp_parameters
increment by 1
start with 0000000001
 nominvalue
/

create sequence seq_cs_emplsocial
increment by 1
start with 0000000001
 nomaxvalue
 nominvalue
order
/

create sequence seq_cs_emplsocial_his
/

create sequence seq_cs_empposition_his
increment by 1
start with 0000000001
 nominvalue
/

create sequence seq_cs_empsocial_result
/

create sequence seq_cs_orgchart
start with 2001
increment by 1
/

create sequence seq_cs_orgemp_his
start with 1
increment by 1
/

create sequence seq_cs_social
increment by 1
start with 10000000000
 nominvalue
 nomaxvalue
/

create sequence seq_cs_social_detail
start with 10000000000
increment by 1
/

create sequence seq_csemp_dimission
increment by 1
start with 1
 nominvalue
/

create sequence seq_employee
increment by 1
start with 0000000001
 nominvalue
order
/

create sequence seq_excel_interface_detail
increment by 1
start with 1
 nominvalue
/

create sequence seq_excel_interface_master
increment by 1
start with 1000
 nominvalue
/

create sequence seq_excel_public_detail
increment by 1
start with 1
 nominvalue
/

create sequence seq_excel_publictype
increment by 1
start with 2000
 nominvalue
/

create sequence seq_flow_instance
start with 1
increment by 1
 nominvalue
/

create sequence seq_flow_runinfo
increment by 1
start with 1
 nominvalue
/

create sequence seq_flow_runnext
start with 1
increment by 1
 nominvalue
/

create sequence seq_pay_class
start with 1000000000
increment by 1
 nominvalue
/

create sequence seq_pay_class_his
increment by 1
start with 1
 nominvalue
/

create sequence seq_pay_classitem
increment by 1
start with 1000000000
 nominvalue
/

create sequence seq_pay_classitem_limitdate
increment by 1
start with 1
 nominvalue
/

create sequence seq_pay_data
increment by 1
start with 1000000000
 nominvalue
order
/

create sequence seq_pay_empdata
increment by 1
start with 0000000001
 nominvalue
order
/

create sequence seq_pay_input
increment by 1
start with 1
 nominvalue
/

create sequence seq_pay_item
start with 1000000000
increment by 1
 nominvalue
/

create sequence seq_pay_log
increment by 1
start with 1000000000
 nominvalue
order
/

create sequence seq_pb_city
increment by 1
start with 20000
 nominvalue
/

create sequence seq_pb_company_linkman
start with 100000000
increment by 1
 nominvalue
/

create sequence seq_pb_company_modify
start with 10000
increment by 1
 nominvalue
/

create sequence seq_pb_parameter
increment by 1
start with 2000
 nominvalue
/

create sequence seq_pb_province
increment by 1
start with 20000
 nominvalue
/

create sequence seq_pb_seckey
increment by 1
start with 1000
 nominvalue
/

create sequence seq_pb_sysparm_detail
increment by 1
start with 2000
/

create sequence seq_pb_sysparm_master
increment by 1
start with 200
/

create sequence seq_pb_user_seckey
start with 100000
increment by 1
 nominvalue
/

create sequence seq_social_detail
/

create sequence seq_social_master
start with 000000001
increment by 1
order
/

create sequence seq_social_type
increment by 1
start with 100000
/

create sequence seq_sysfunction
increment by 1
start with 1
 nominvalue
/

/*==============================================================*/
/* Table: cs_account                                          */
/*==============================================================*/
create table cs_account  (
   company_code       VARCHAR2(32),
   user_id            VARCHAR2(32),
   creator_id         INTEGER,
   create_code        VARCHAR(20),
   create_date        DATE                           default SYSDATE,
   creator_IP         VARCHAR(20),
   modifier_id        INTEGER,
   modifier_code      VARCHAR(20),
   modifier_date      date                           default SYSDATE,
   modifier_IP        VARCHAR(20),
   data_come          SMALLINT,
   unfreeze_date      DATE,
   display_name       VARCHAR2(100),
   is_valid           INTEGER default 1 not null,
   LOGIN_DATE         DATE
)
/

comment on table cs_account is
'�ͻ��ʺű�'
/

comment on column cs_account.company_code is
'�ͻ�����'
/

comment on column cs_account.user_id is
'�ʺű�ʶ'
/

comment on column cs_account.creator_id is
'�����˱��'
/

comment on column cs_account.create_code is
'�������ʺ�'
/

comment on column cs_account.create_date is
'����ʱ��'
/

comment on column cs_account.creator_IP is
'������IP'
/

comment on column cs_account.modifier_id is
'�޸��˱��'
/

comment on column cs_account.modifier_code is
'�޸����ʺ�'
/

comment on column cs_account.modifier_date is
'�޸�ʱ��'
/

comment on column cs_account.modifier_IP is
'�޸���IP'
/

comment on column cs_account.data_come is
'���4Դ'
/

comment on column cs_account.unfreeze_date is
'�ⶳʱ��'
/

comment on column cs_account.display_name is
'��ʾ��'
/

comment on column cs_account.is_valid is
'�Ƿ���Ч/����'
/

comment on column cs_account.LOGIN_DATE is
'���һ�ε�¼ʱ��'
/

/*==============================================================*/
/* Table: cs_emp_account                                      */
/*==============================================================*/
create table cs_emp_account  (
   company_code       VARCHAR2(32),
   employee_id        INTEGER,
   login_code         VARCHAR2(32)                    not null,
   constraint PK_CS_EMP_ACCOUNT primary key (login_code)
)
/

comment on table cs_emp_account is
'�ͻ��ʺŶ�Ӧ��'
/

comment on column cs_emp_account.company_code is
'�ͻ���ʶ'
/

comment on column cs_emp_account.employee_id is
'Ա����ʶ'
/

comment on column cs_emp_account.login_code is
'��¼�ʺ�'
/

/*==============================================================*/
/* Table: cs_emp_dimission                                    */
/*==============================================================*/
create table cs_emp_dimission  (
   dis_id             INTEGER                         not null,
   company_code       VARCHAR2(32),
   employee_id        INTEGER,
   social_end         VARCHAR2(10),
   pay_end            VARCHAR2(10),
   dis_memo           VARCHAR2(200),
   status             INTEGER,
   constraint PK_CS_EMP_DIMISSION primary key (dis_id)
)
/

comment on table cs_emp_dimission is
'��Ա����'
/

comment on column cs_emp_dimission.dis_id is
'��ʶ'
/

comment on column cs_emp_dimission.company_code is
'�ͻ���ʶ'
/

comment on column cs_emp_dimission.employee_id is
'��Ա��ʶ'
/

comment on column cs_emp_dimission.social_end is
'�籣��ֹ��'
/

comment on column cs_emp_dimission.pay_end is
'н����ֹ��'
/

comment on column cs_emp_dimission.dis_memo is
'����ԭ��'
/

comment on column cs_emp_dimission.status is
'״̬'
/

/*==============================================================*/
/* Table: cs_emplsocial                                       */
/*==============================================================*/
create table cs_emplsocial  (
   employee_ss_id     INTEGER                         not null,
   company_code       VARCHAR2(32)                    not null,
   employee_id        INTEGER                         not null,
   start_month        VARCHAR2(10),
   end_month          VARCHAR2(10),
   person_base_value  NUMBER(9,2),
   person_percent_value NUMBER(9,4),
   company_base_value NUMBER(9,2),
   company_percent_value NUMBER(9,4),
   template_id        INTEGER,
   social_security_id INTEGER                         not null,
   is_valid           SMALLINT                       default 1,
   datanode           integer,
   lastused_date      date,
   add_start_month    varchar2(10),
   add_pay_month      varchar2(10),
   add_end_month      varchar2(10),
   creator_id         INTEGER,
   create_code        VARCHAR(20),
   create_date        DATE                           default SYSDATE,
   creator_IP         VARCHAR(20),
   modifier_id        INTEGER,
   modifier_code      VARCHAR(20),
   modify_date        date                           default SYSDATE,
   modifier_IP        VARCHAR(20),
   constraint PK_CS_EMPLSOCIAL primary key (employee_ss_id)
)
/

comment on table cs_emplsocial is
'Ա���籣������'
/

comment on column cs_emplsocial.employee_ss_id is
'��ʶ'
/

comment on column cs_emplsocial.company_code is
'�ͻ���ʶ'
/

comment on column cs_emplsocial.employee_id is
'Ա����ʶ'
/

comment on column cs_emplsocial.start_month is
'��ʼ��'
/

comment on column cs_emplsocial.end_month is
'��ֹ��'
/

comment on column cs_emplsocial.person_base_value is
'���˻���'
/

comment on column cs_emplsocial.person_percent_value is
'���˱���'
/

comment on column cs_emplsocial.company_base_value is
'��ҵ����'
/

comment on column cs_emplsocial.company_percent_value is
'��ҵ����'
/

comment on column cs_emplsocial.template_id is
'ģ���ʶ'
/

comment on column cs_emplsocial.social_security_id is
'��Ŀ���ʾ'
/

comment on column cs_emplsocial.is_valid is
'�Ƿ���Ч'
/

comment on column cs_emplsocial.datanode is
'�������ʾ'
/

comment on column cs_emplsocial.lastused_date is
'���ʹ������'
/

comment on column cs_emplsocial.add_start_month is
'������ʼ��'
/

comment on column cs_emplsocial.add_pay_month is
'ʵ����'
/

comment on column cs_emplsocial.add_end_month is
'������ֹ��'
/

comment on column cs_emplsocial.creator_id is
'�����˱��'
/

comment on column cs_emplsocial.create_code is
'�������ʺ�'
/

comment on column cs_emplsocial.create_date is
'����ʱ��'
/

comment on column cs_emplsocial.creator_IP is
'������IP'
/

comment on column cs_emplsocial.modifier_id is
'�޸��˱��'
/

comment on column cs_emplsocial.modifier_code is
'�޸����ʺ�'
/

comment on column cs_emplsocial.modify_date is
'�޸�ʱ��'
/

comment on column cs_emplsocial.modifier_IP is
'�޸���IP'
/

/*==============================================================*/
/* Table: cs_empposition_his                                  */
/*==============================================================*/
create table cs_empposition_his  (
   his_id             INTEGER                         not null,
   company_code       VARCHAR2(32)                    not null,
   employee_id        INTEGER                         not null,
   position_code      VARCHAR2(20)                    not null,
   creator_id         INTEGER,
   create_code        VARCHAR(20),
   create_date        DATE                           default SYSDATE,
   creator_IP         VARCHAR(20),
   modifier_id        INTEGER,
   modifier_code      VARCHAR(20),
   modifier_date      date                           default SYSDATE,
   modifier_IP        VARCHAR(20),
   constraint PK_CS_EMPPOSITION_HIS primary key (his_id)
)
/

comment on table cs_empposition_his is
'��Ա��λ��ʷ��'
/

comment on column cs_empposition_his.his_id is
'��ʷ��ʶ'
/

comment on column cs_empposition_his.company_code is
'�ͻ�����'
/

comment on column cs_empposition_his.employee_id is
'��Ա����'
/

comment on column cs_empposition_his.position_code is
'��λ����'
/

comment on column cs_empposition_his.creator_id is
'�����˱��'
/

comment on column cs_empposition_his.create_code is
'�������ʺ�'
/

comment on column cs_empposition_his.create_date is
'����ʱ��'
/

comment on column cs_empposition_his.creator_IP is
'������IP'
/

comment on column cs_empposition_his.modifier_id is
'�޸��˱��'
/

comment on column cs_empposition_his.modifier_code is
'�޸����ʺ�'
/

comment on column cs_empposition_his.modifier_date is
'�޸�ʱ��'
/

comment on column cs_empposition_his.modifier_IP is
'�޸���IP'
/

/*==============================================================*/
/* Table: cs_empsocial_result                                 */
/*==============================================================*/
create table cs_empsocial_result  (
   employee_ss_id     INTEGER                         not null,
   social_security_id INTEGER                         not null,
   company_code       VARCHAR2(32)                    not null,
   employee_id        INTEGER                         not null,
   period             VARCHAR2(10)                    not null,
   result             NUMBER(9,2),
   is_valid           SMALLINT                       default 0,
   person_result      NUMBER(9,2)                    default 0,
   company_result     NUMBER(9,2)                    default 0,
   person_base_value  NUMBER(9,2)                    default 0,
   person_percent_value NUMBER(9,4)                    default 0,
   company_base_value NUMBER(9,2)                    default 0,
   company_percent_value NUMBER(9,4)                    default 0,
   person_tax         NUMBER(9,2)                    default 0,
   company_tax        NUMBER(9,2)                    default 0,
   person_result_add  NUMBER(9,2)                    default 0,
   company_result_add NUMBER(9,2)                    default 0,
   modifier_id        INTEGER,
   modify_date        DATE,
   creator_id         INTEGER,
   create_code        VARCHAR(20),
   create_date        DATE                           default SYSDATE,
   creator_IP         VARCHAR(20),
   modifier_id2       INTEGER,
   modifier_code      VARCHAR(20),
   modifier_date      date                           default SYSDATE,
   modifier_IP        VARCHAR(20),
   data_come          INTEGER                        default 1,
   his_id             integer,
   constraint PK_CS_EMPSOCIAL_RESULT primary key (employee_ss_id)
)
/

comment on table cs_empsocial_result is
'�籣����'
/

comment on column cs_empsocial_result.employee_ss_id is
'Ա���籣����ʾ'
/

comment on column cs_empsocial_result.social_security_id is
'��Ŀ���ʾ'
/

comment on column cs_empsocial_result.company_code is
'�ͻ���ʾ'
/

comment on column cs_empsocial_result.employee_id is
'Ա����ʾ'
/

comment on column cs_empsocial_result.period is
'����·�'
/

comment on column cs_empsocial_result.result is
'��ֵ'
/

comment on column cs_empsocial_result.is_valid is
'�Ƿ���Ч'
/

comment on column cs_empsocial_result.person_result is
'���˽�����'
/

comment on column cs_empsocial_result.company_result is
'��ҵ������'
/

comment on column cs_empsocial_result.person_base_value is
'���˻���'
/

comment on column cs_empsocial_result.person_percent_value is
'���˱���'
/

comment on column cs_empsocial_result.company_base_value is
'��ҵ����'
/

comment on column cs_empsocial_result.company_percent_value is
'��ҵ����'
/

comment on column cs_empsocial_result.person_tax is
'����Ӧ˰'
/

comment on column cs_empsocial_result.company_tax is
'��ҵӦ˰'
/

comment on column cs_empsocial_result.person_result_add is
'���˵��²���'
/

comment on column cs_empsocial_result.company_result_add is
'��ҵ���²���'
/

comment on column cs_empsocial_result.modifier_id is
'��Ч��'
/

comment on column cs_empsocial_result.modify_date is
'��Ч����'
/

comment on column cs_empsocial_result.creator_id is
'�����˱��'
/

comment on column cs_empsocial_result.create_code is
'�������ʺ�'
/

comment on column cs_empsocial_result.create_date is
'����ʱ��'
/

comment on column cs_empsocial_result.creator_IP is
'������IP'
/

comment on column cs_empsocial_result.modifier_id2 is
'�޸��˱��'
/

comment on column cs_empsocial_result.modifier_code is
'�޸����ʺ�'
/

comment on column cs_empsocial_result.modifier_date is
'�޸�ʱ��'
/

comment on column cs_empsocial_result.modifier_IP is
'�޸���IP'
/

comment on column cs_empsocial_result.data_come is
'���4Դ'
/

comment on column cs_empsocial_result.his_id is
'��ʷ��¼��ʶ'
/

/*==============================================================*/
/* Table: cs_empsocial_result_his                             */
/*==============================================================*/
create table cs_empsocial_result_his  (
   his_id             integer                         not null,
   employee_ss_id     INTEGER                         not null,
   social_security_id INTEGER                         not null,
   company_code       VARCHAR2(32)                    not null,
   employee_id        INTEGER                         not null,
   period             VARCHAR2(10)                    not null,
   result             NUMBER(9,2),
   is_valid           SMALLINT                       default 1,
   person_result      NUMBER(9,2)                    default 0,
   company_result     NUMBER(9,2)                    default 0,
   person_base_value  NUMBER(9,2)                    default 0,
   person_percent_value NUMBER(9,4)                    default 0,
   company_base_value NUMBER(9,2)                    default 0,
   company_percent_value NUMBER(9,4)                    default 0,
   person_tax         NUMBER(9,2)                    default 0,
   company_tax        NUMBER(9,2)                    default 0,
   person_result_add  NUMBER(9,2)                    default 0,
   company_result_add NUMBER(9,2)                    default 0,
   modifier_id        INTEGER,
   modify_date        DATE,
   creator_id         INTEGER,
   create_code        VARCHAR(20),
   create_date        DATE                           default SYSDATE,
   creator_IP         VARCHAR(20),
   modifier_id2       INTEGER,
   modifier_code      VARCHAR(20),
   modifier_date      date                           default SYSDATE,
   modifier_IP        VARCHAR(20),
   data_come          INTEGER                        default 1,
   constraint PK_CS_EMPSOCIAL_RESULT_HIS primary key (his_id, employee_ss_id)
)
/

comment on table cs_empsocial_result_his is
'�籣�����ʷ��'
/

comment on column cs_empsocial_result_his.his_id is
'��ʷ��¼��ʶ'
/

comment on column cs_empsocial_result_his.employee_ss_id is
'Ա���籣����ʾ'
/

comment on column cs_empsocial_result_his.social_security_id is
'��Ŀ���ʾ'
/

comment on column cs_empsocial_result_his.company_code is
'�ͻ���ʾ'
/

comment on column cs_empsocial_result_his.employee_id is
'Ա����ʾ'
/

comment on column cs_empsocial_result_his.period is
'����·�'
/

comment on column cs_empsocial_result_his.result is
'��ֵ'
/

comment on column cs_empsocial_result_his.is_valid is
'�Ƿ���Ч'
/

comment on column cs_empsocial_result_his.person_result is
'���˽�����'
/

comment on column cs_empsocial_result_his.company_result is
'��ҵ������'
/

comment on column cs_empsocial_result_his.person_base_value is
'���˻���'
/

comment on column cs_empsocial_result_his.person_percent_value is
'���˱���'
/

comment on column cs_empsocial_result_his.company_base_value is
'��ҵ����'
/

comment on column cs_empsocial_result_his.company_percent_value is
'��ҵ����'
/

comment on column cs_empsocial_result_his.person_tax is
'����Ӧ˰'
/

comment on column cs_empsocial_result_his.company_tax is
'��ҵӦ˰'
/

comment on column cs_empsocial_result_his.person_result_add is
'���˵��²���'
/

comment on column cs_empsocial_result_his.company_result_add is
'��ҵ���²���'
/

comment on column cs_empsocial_result_his.modifier_id is
'��Ч��'
/

comment on column cs_empsocial_result_his.modify_date is
'��Ч����'
/

comment on column cs_empsocial_result_his.creator_id is
'�����˱��'
/

comment on column cs_empsocial_result_his.create_code is
'�������ʺ�'
/

comment on column cs_empsocial_result_his.create_date is
'����ʱ��'
/

comment on column cs_empsocial_result_his.creator_IP is
'������IP'
/

comment on column cs_empsocial_result_his.modifier_id2 is
'�޸��˱��'
/

comment on column cs_empsocial_result_his.modifier_code is
'�޸����ʺ�'
/

comment on column cs_empsocial_result_his.modifier_date is
'�޸�ʱ��'
/

comment on column cs_empsocial_result_his.modifier_IP is
'�޸���IP'
/

comment on column cs_empsocial_result_his.data_come is
'���4Դ'
/

/*==============================================================*/
/* Table: cs_end                                              */
/*==============================================================*/
create table cs_end  (
   company_code       VARCHAR2(32),
   end_reason         VARCHAR2(4000),
   end_memo           VARCHAR2(4000),
   end_date           date,
   end_time           date,
   end_user           varchar2(20)
)
/

comment on table cs_end is
'�ͻ�ͣ��ԭ��'
/

comment on column cs_end.company_code is
'�ͻ���ʶ'
/

comment on column cs_end.end_reason is
'ͣ��ԭ��'
/

comment on column cs_end.end_memo is
'ͣ��˵��'
/

comment on column cs_end.end_date is
'ͣ������'
/

comment on column cs_end.end_time is
'ͣ��ʱ��'
/

comment on column cs_end.end_user is
'ͣ����'
/

/*==============================================================*/
/* Table: cs_org_emp                                          */
/*==============================================================*/
create table cs_org_emp  (
   company_code       VARCHAR2(32),
   orgchart_id        INTEGER,
   employee_id        INTEGER,
   is_major           INTEGER
)
/

comment on table cs_org_emp is
'��Ա��֯�ܹ���Ӧ'
/

comment on column cs_org_emp.company_code is
'�ͻ���ʶ'
/

comment on column cs_org_emp.orgchart_id is
'��֯�ṹ��ʶ'
/

comment on column cs_org_emp.employee_id is
'��Ա��ʶ'
/

comment on column cs_org_emp.is_major is
'�Ƿ�����'
/

/*==============================================================*/
/* Table: cs_orgchart                                         */
/*==============================================================*/
create table cs_orgchart  (
   company_code       VARCHAR2(32),
   orgchart_id        INTEGER                         not null,
   super_org_id       INTEGER,
   orgchart_code      VARCHAR2(32),
   orgchart_name      VARCHAR2(50),
   is_valid           SMALLINT,
   memo               VARCHAR2(200),
   orgchart_type      INTEGER,
   constraint PK_CS_ORGCHART primary key (orgchart_id)
)
/

comment on table cs_orgchart is
'�ͻ���֯�ܹ�'
/

comment on column cs_orgchart.company_code is
'�ͻ���ʶ'
/

comment on column cs_orgchart.orgchart_id is
'��֯�ṹ��ʶ'
/

comment on column cs_orgchart.super_org_id is
'�ϼ���֯����'
/

comment on column cs_orgchart.orgchart_code is
'��֯�ṹ����'
/

comment on column cs_orgchart.orgchart_name is
'��֯���'
/

comment on column cs_orgchart.is_valid is
'�Ƿ���Ч'
/

comment on column cs_orgchart.memo is
'˵��'
/

comment on column cs_orgchart.orgchart_type is
'����'
/

/*==============================================================*/
/* Table: cs_orgemp_his                                       */
/*==============================================================*/
create table cs_orgemp_his  (
   his_id             INTEGER                         not null,
   company_code       VARCHAR2(32),
   orgchart_id        INTEGER,
   employee_id        INTEGER,
   is_major           INTEGER,
   creator_id         INTEGER,
   create_code        VARCHAR(20),
   create_date        DATE                           default SYSDATE,
   creator_IP         VARCHAR(20),
   modifier_id        INTEGER,
   modifier_code      VARCHAR(20),
   modifier_date      date                           default SYSDATE,
   modifier_IP        VARCHAR(20),
   constraint PK_CS_ORGEMP_HIS primary key (his_id)
)
/

comment on table cs_orgemp_his is
'��Ա��֯�ܹ���ʷ��'
/

comment on column cs_orgemp_his.his_id is
'��ʷ��ʶ'
/

comment on column cs_orgemp_his.company_code is
'�ͻ���ʶ'
/

comment on column cs_orgemp_his.orgchart_id is
'��֯�ṹ��ʶ'
/

comment on column cs_orgemp_his.employee_id is
'��Ա��ʶ'
/

comment on column cs_orgemp_his.is_major is
'�Ƿ�����'
/

comment on column cs_orgemp_his.creator_id is
'�����˱��'
/

comment on column cs_orgemp_his.create_code is
'�������ʺ�'
/

comment on column cs_orgemp_his.create_date is
'����ʱ��'
/

comment on column cs_orgemp_his.creator_IP is
'������IP'
/

comment on column cs_orgemp_his.modifier_id is
'�޸��˱��'
/

comment on column cs_orgemp_his.modifier_code is
'�޸����ʺ�'
/

comment on column cs_orgemp_his.modifier_date is
'�޸�ʱ��'
/

comment on column cs_orgemp_his.modifier_IP is
'�޸���IP'
/

/*==============================================================*/
/* Table: cs_pay_input                                        */
/*==============================================================*/
create table cs_pay_input  (
   pay_input_id       INTEGER                         not null,
   company_code       VARCHAR2(32)                    not null,
   employee_id        INTEGER                         not null,
   pay_classitem_id   INTEGER                         not null,
   pay_class_id       INTEGER,
   period             VARCHAR2(10),
   pay_money          VARCHAR2(100),
   creator_code       INTEGER,
   creat_date         date,
   modifier_code      INTEGER,
   modify_date        date,
   status             SMALLINT                       default 1,
   constraint PK_CS_PAY_INPUT primary key (pay_input_id)
)
/

comment on table cs_pay_input is
'��Աн�������'
/

comment on column cs_pay_input.pay_input_id is
'��ʶ'
/

comment on column cs_pay_input.company_code is
'�ͻ���ʶ'
/

comment on column cs_pay_input.employee_id is
'Ա����ʶ'
/

comment on column cs_pay_input.pay_classitem_id is
'н����Ŀ��ʶ'
/

comment on column cs_pay_input.pay_class_id is
'н������ʶ'
/

comment on column cs_pay_input.period is
'����·�'
/

comment on column cs_pay_input.pay_money is
'���'
/

comment on column cs_pay_input.creator_code is
'�����˱��'
/

comment on column cs_pay_input.creat_date is
'����ʱ��'
/

comment on column cs_pay_input.modifier_code is
'�޸��˱��'
/

comment on column cs_pay_input.modify_date is
'�޸�ʱ��'
/

comment on column cs_pay_input.status is
'״̬'
/

/*==============================================================*/
/* Table: cs_pay_input_his                                    */
/*==============================================================*/
create table cs_pay_input_his  (
   his_id             integer                         not null,
   pay_input_id       INTEGER                         not null,
   company_code       VARCHAR2(32)                    not null,
   employee_id        INTEGER                         not null,
   pay_classitem_id   INTEGER                         not null,
   pay_class_id       INTEGER,
   period             VARCHAR2(10),
   pay_money          VARCHAR2(100),
   creator_code       INTEGER,
   creat_date         date,
   modifier_code      INTEGER,
   modify_date        date,
   status             SMALLINT                       default 1,
   constraint PK_CS_PAY_INPUT_HIS primary key (his_id, pay_input_id)
)
/

comment on table cs_pay_input_his is
'��Աн��������ʷ��'
/

comment on column cs_pay_input_his.his_id is
'��ʷ��¼��ʶ'
/

comment on column cs_pay_input_his.pay_input_id is
'��ʶ'
/

comment on column cs_pay_input_his.company_code is
'�ͻ���ʶ'
/

comment on column cs_pay_input_his.employee_id is
'Ա����ʶ'
/

comment on column cs_pay_input_his.pay_classitem_id is
'н����Ŀ��ʶ'
/

comment on column cs_pay_input_his.pay_class_id is
'н������ʶ'
/

comment on column cs_pay_input_his.period is
'����·�'
/

comment on column cs_pay_input_his.pay_money is
'���'
/

comment on column cs_pay_input_his.creator_code is
'�����˱��'
/

comment on column cs_pay_input_his.creat_date is
'����ʱ��'
/

comment on column cs_pay_input_his.modifier_code is
'�޸��˱��'
/

comment on column cs_pay_input_his.modify_date is
'�޸�ʱ��'
/

comment on column cs_pay_input_his.status is
'״̬'
/

/*==============================================================*/
/* Table: cs_position                                         */
/*==============================================================*/
create table cs_position  (
   company_code       VARCHAR2(32)                    not null,
   position_code      VARCHAR2(20)                    not null,
   position_name      VARCHAR2(100),
   position_memo      VARCHAR2(200),
   position_money     NUMERIC(9,2),
   is_valid           SMALLINT,
   constraint PK_CS_POSITION primary key (company_code, position_code)
)
/

comment on table cs_position is
'��λ��'
/

comment on column cs_position.company_code is
'�ͻ�����'
/

comment on column cs_position.position_code is
'��λ����'
/

comment on column cs_position.position_name is
'��λ���'
/

comment on column cs_position.position_memo is
'��λ˵��'
/

comment on column cs_position.position_money is
'��λ����'
/

comment on column cs_position.is_valid is
'�Ƿ���Ч'
/

/*==============================================================*/
/* Table: cs_position_emp                                     */
/*==============================================================*/
create table cs_position_emp  (
   company_code       VARCHAR2(32)                    not null,
   employee_id        INTEGER                         not null,
   position_code      VARCHAR2(20)                    not null,
   constraint PK_CS_POSITION_EMP primary key (company_code, employee_id, position_code)
)
/

comment on table cs_position_emp is
'��Ա��λ��'
/

comment on column cs_position_emp.company_code is
'�ͻ���ʶ'
/

comment on column cs_position_emp.employee_id is
'��Ա��ʶ'
/

comment on column cs_position_emp.position_code is
'��λ����'
/

/*==============================================================*/
/* Table: cs_product                                          */
/*==============================================================*/
create table cs_product  (
   product_ID         SMALLINT                        not null,
   company_code       VARCHAR2(32)
)
/

comment on table cs_product is
'�ͻ���Ʒ��'
/

comment on column cs_product.product_ID is
'��Ʒ����'
/

comment on column cs_product.company_code is
'�ͻ�����'
/

/*==============================================================*/
/* Table: cs_role                                             */
/*==============================================================*/
create table cs_role  (
   company_code       VARCHAR2(32),
   role_id            VARCHAR2(32),
   creator_id         INTEGER,
   create_code        VARCHAR(20),
   create_date        DATE                           default SYSDATE,
   creator_IP         VARCHAR(20),
   modifier_id        INTEGER,
   modifier_code      VARCHAR(20),
   modifier_date      date                           default SYSDATE,
   modifier_IP        VARCHAR(20),
   data_come          SMALLINT
)
/

comment on table cs_role is
'�ͻ���ɫ��'
/

comment on column cs_role.company_code is
'�ͻ�����'
/

comment on column cs_role.role_id is
'��ɫ����'
/

comment on column cs_role.creator_id is
'�����˱��'
/

comment on column cs_role.create_code is
'�������ʺ�'
/

comment on column cs_role.create_date is
'����ʱ��'
/

comment on column cs_role.creator_IP is
'������IP'
/

comment on column cs_role.modifier_id is
'�޸��˱��'
/

comment on column cs_role.modifier_code is
'�޸����ʺ�'
/

comment on column cs_role.modifier_date is
'�޸�ʱ��'
/

comment on column cs_role.modifier_IP is
'�޸���IP'
/

comment on column cs_role.data_come is
'���4Դ'
/

/*==============================================================*/
/* Table: cs_seckey                                           */
/*==============================================================*/
create table cs_seckey  (
   company_code       VARCHAR2(32),
   seckey_id          INTEGER,
   creator_id         INTEGER,
   create_code        VARCHAR(20),
   create_date        DATE                           default SYSDATE,
   creator_IP         VARCHAR(20),
   modifier_id        INTEGER,
   modifier_code      VARCHAR(20),
   modifier_date      date                           default SYSDATE,
   modifier_IP        VARCHAR(20)
)
/

comment on table cs_seckey is
'�ͻ�Ȩ�ޱ�'
/

comment on column cs_seckey.company_code is
'�ͻ�����'
/

comment on column cs_seckey.seckey_id is
'Ȩ�ޱ�ʶ'
/

comment on column cs_seckey.creator_id is
'�����˱��'
/

comment on column cs_seckey.create_code is
'�������ʺ�'
/

comment on column cs_seckey.create_date is
'����ʱ��'
/

comment on column cs_seckey.creator_IP is
'������IP'
/

comment on column cs_seckey.modifier_id is
'�޸��˱��'
/

comment on column cs_seckey.modifier_code is
'�޸����ʺ�'
/

comment on column cs_seckey.modifier_date is
'�޸�ʱ��'
/

comment on column cs_seckey.modifier_IP is
'�޸���IP'
/

/*==============================================================*/
/* Table: cs_social                                           */
/*==============================================================*/
create table cs_social  (
   template_id        INTEGER                         not null,
   name               VARCHAR2(40),
   description        VARCHAR2(100),
   is_valid           SMALLINT                       default 1,
   company_code       VARCHAR2(32),
   creator_id         INTEGER,
   create_code        VARCHAR(20),
   create_date        DATE                           default SYSDATE,
   creator_IP         VARCHAR(20),
   modifier_id        INTEGER,
   modifier_code      VARCHAR(20),
   modifier_date      date                           default SYSDATE,
   modifier_IP        VARCHAR(20),
   constraint PK_CS_SOCIAL primary key (template_id)
)
/

comment on table cs_social is
'�ͻ��籣ģ��'
/

comment on column cs_social.template_id is
'��ʶ'
/

comment on column cs_social.name is
'ģ�����'
/

comment on column cs_social.description is
'˵��'
/

comment on column cs_social.is_valid is
'�Ƿ���Ч'
/

comment on column cs_social.company_code is
'�ͻ���ʶ'
/

comment on column cs_social.creator_id is
'�����˱��'
/

comment on column cs_social.create_code is
'�������ʺ�'
/

comment on column cs_social.create_date is
'����ʱ��'
/

comment on column cs_social.creator_IP is
'������IP'
/

comment on column cs_social.modifier_id is
'�޸��˱��'
/

comment on column cs_social.modifier_code is
'�޸����ʺ�'
/

comment on column cs_social.modifier_date is
'�޸�ʱ��'
/

comment on column cs_social.modifier_IP is
'�޸���IP'
/

/*==============================================================*/
/* Table: cs_social_detail                                    */
/*==============================================================*/
create table cs_social_detail  (
   sub_social_security_id INTEGER                         not null,
   template_id        INTEGER                         not null,
   social_security_id INTEGER                         not null,
   is_valid           SMALLINT                       default 1,
   is_follow          SMALLINT                       default 0,
   person_base_value  NUMBER(9,2),
   person_percent_value NUMBER(9,4),
   company_base_value NUMBER(9,2),
   company_percent_value NUMBER(9,4),
   show_name          VARCHAR2(80),
   creator_id         INTEGER,
   create_date        DATE,
   modifier_id        INTEGER,
   modify_date        DATE,
   constraint PK_CS_SOCIAL_DETAIL primary key (sub_social_security_id)
)
/

comment on table cs_social_detail is
'�ͻ��籣��Ŀ�ӱ�'
/

comment on column cs_social_detail.sub_social_security_id is
'��ʶ'
/

comment on column cs_social_detail.template_id is
'ģ���ʶ'
/

comment on column cs_social_detail.social_security_id is
'�籣��Ŀ��ʶ'
/

comment on column cs_social_detail.is_valid is
'�Ƿ���Ч'
/

comment on column cs_social_detail.is_follow is
'�Ƿ����'
/

comment on column cs_social_detail.person_base_value is
'���˻���'
/

comment on column cs_social_detail.person_percent_value is
'���˱���'
/

comment on column cs_social_detail.company_base_value is
'��ҵ����'
/

comment on column cs_social_detail.company_percent_value is
'��ҵ����'
/

comment on column cs_social_detail.show_name is
'��ʾ���'
/

comment on column cs_social_detail.creator_id is
'�����˱��'
/

comment on column cs_social_detail.create_date is
'��������'
/

comment on column cs_social_detail.modifier_id is
'����޸��˱��'
/

comment on column cs_social_detail.modify_date is
'����޸�����'
/

/*==============================================================*/
/* Table: excel_interface_detail                              */
/*==============================================================*/
create table excel_interface_detail  (
   ex_sub_interfaceid integer                         not null,
   ex_interfaceid     integer,
   classitem_id       integer,
   col_num            varchar(10),
   ex_sub_code        varchar(50),
   constraint PK_EXCEL_INTERFACE_DETAIL primary key (ex_sub_interfaceid)
)
/

comment on table excel_interface_detail is
'excel��������'
/

comment on column excel_interface_detail.ex_sub_interfaceid is
'��ʶ'
/

comment on column excel_interface_detail.ex_interfaceid is
'����ʾ'
/

comment on column excel_interface_detail.classitem_id is
'��Ŀ��ʾ'
/

comment on column excel_interface_detail.col_num is
'��Ӧcellλ��'
/

comment on column excel_interface_detail.ex_sub_code is
'��Ŀϸ��'
/

/*==============================================================*/
/* Table: excel_interface_master                              */
/*==============================================================*/
create table excel_interface_master  (
   ex_interfaceid     integer                         not null,
   company_code       varchar(32),
   ex_publictype      smallint,
   ex_name            varchar(50),
   ex_classid         integer,
   ex_empid           varchar(20),
   ex_empid_col       varchar(10),
   ex_start           integer,
   ex_end             integer,
   creator_code       INTEGER,
   creat_date         TIMESTAMP,
   modifier_code      INTEGER,
   modify_date        TIMESTAMP,
   memo               varchar2(200),
   is_valid           smallint,
   constraint PK_EXCEL_INTERFACE_MASTER primary key (ex_interfaceid)
)
/

comment on table excel_interface_master is
'excel�����'
/

comment on column excel_interface_master.ex_interfaceid is
'��ʶ'
/

comment on column excel_interface_master.company_code is
'�ͻ����'
/

comment on column excel_interface_master.ex_publictype is
'excel�ļ����'
/

comment on column excel_interface_master.ex_name is
'���'
/

comment on column excel_interface_master.ex_classid is
'��Ӧid��'
/

comment on column excel_interface_master.ex_empid is
'��ԱΨһ��ʾ'
/

comment on column excel_interface_master.ex_empid_col is
'Ψһ��ʾ��Ӧ�к�'
/

comment on column excel_interface_master.ex_start is
'��ݿ�ʼ��'
/

comment on column excel_interface_master.ex_end is
'��ݽ�����'
/

comment on column excel_interface_master.creator_code is
'�����˱��'
/

comment on column excel_interface_master.creat_date is
'����ʱ��'
/

comment on column excel_interface_master.modifier_code is
'�޸��˱��'
/

comment on column excel_interface_master.modify_date is
'�޸�ʱ��'
/

comment on column excel_interface_master.memo is
'˵��'
/

comment on column excel_interface_master.is_valid is
'�Ƿ���Ч'
/

/*==============================================================*/
/* Table: excel_public_detail                                 */
/*==============================================================*/
create table excel_public_detail  (
   ex_sub_id          integer                         not null,
   ex_publictype      varchar(20),
   ex_sub_code        varchar(50),
   ex_sub_name        varchar(50),
   is_necessary       smallint,
   ex_memo            varchar(200),
   is_only            smallint,
   ex_publicid        integer,
   ex_datatype        CHAR(1)                        default 'S',
   constraint PK_EXCEL_PUBLIC_DETAIL primary key (ex_sub_id)
)
/

comment on table excel_public_detail is
'excel�̶���Ŀϸ��'
/

comment on column excel_public_detail.ex_sub_id is
'��ʶ'
/

comment on column excel_public_detail.ex_publictype is
'excel�ļ����'
/

comment on column excel_public_detail.ex_sub_code is
'��Ŀϸ��'
/

comment on column excel_public_detail.ex_sub_name is
'��Ŀϸ�����'
/

comment on column excel_public_detail.is_necessary is
'�Ƿ����'
/

comment on column excel_public_detail.ex_memo is
'˵��'
/

comment on column excel_public_detail.is_only is
'�Ƿ�Ψһ'
/

comment on column excel_public_detail.ex_publicid is
'������Ŀ��ʾ'
/

comment on column excel_public_detail.ex_datatype is
'�������'
/

/*==============================================================*/
/* Table: excel_public_master                                 */
/*==============================================================*/
create table excel_public_master  (
   ex_publicid        SMALLINT                        not null,
   ex_publicname      varchar2(50),
   is_used            smallint,
   ex_memo            VARCHAR(200),
   ex_publictype      SMALLINT,
   creator_code       INTEGER,
   creat_date         TIMESTAMP,
   modifier_code      INTEGER,
   modify_date        TIMESTAMP,
   table_name         varchar2(50),
   constraint PK_EXCEL_PUBLIC_MASTER primary key (ex_publicid)
)
/

comment on table excel_public_master is
'excel���빫����Ŀ��'
/

comment on column excel_public_master.ex_publicid is
'��ʶ'
/

comment on column excel_public_master.ex_publicname is
'�̶���Ŀ���'
/

comment on column excel_public_master.is_used is
'�Ƿ���Ч'
/

comment on column excel_public_master.ex_memo is
'˵��'
/

comment on column excel_public_master.ex_publictype is
'excel�ļ����'
/

comment on column excel_public_master.creator_code is
'�����˱��'
/

comment on column excel_public_master.creat_date is
'����ʱ��'
/

comment on column excel_public_master.modifier_code is
'�޸��˱��'
/

comment on column excel_public_master.modify_date is
'�޸�ʱ��'
/

comment on column excel_public_master.table_name is
'��Ӧ����'
/

/*==============================================================*/
/* Table: excel_public_type                                   */
/*==============================================================*/
create table excel_public_type  (
   ex_publictype      smallint                        not null,
   ex_publicname      varchar2(50),
   is_valid           smallint,
   memo               varchar2(200),
   constraint PK_EXCEL_PUBLIC_TYPE primary key (ex_publictype)
)
/

comment on table excel_public_type is
'excel������Ŀ���'
/

comment on column excel_public_type.ex_publictype is
'��ʶ'
/

comment on column excel_public_type.ex_publicname is
'excel��ʶ���'
/

comment on column excel_public_type.is_valid is
'�Ƿ���Ч'
/

comment on column excel_public_type.memo is
'˵��'
/

/*==============================================================*/
/* Table: flow_instance                                       */
/*==============================================================*/
create table flow_instance  (
   flow_insid         INTEGER                         not null,
   flow_id            INTEGER,
   flow_status        VARCHAR2(2),
   priod              VARCHAR2(10),
   compand_code       VARCHAR2(32),
   flow_at            INTEGER,
   this_company       VARCHAR2(32),
   pre_insid          INTEGER,
   constraint PK_FLOW_INSTANCE primary key (flow_insid)
)
/

comment on table flow_instance is
'���ʵ��'
/

comment on column flow_instance.flow_insid is
'ʵ���ʶ'
/

comment on column flow_instance.flow_id is
'��̱�ʶ'
/

comment on column flow_instance.flow_status is
'״̬'
/

comment on column flow_instance.priod is
'�ڼ�'
/

comment on column flow_instance.compand_code is
'�ͻ�'
/

comment on column flow_instance.flow_at is
'�������״̬'
/

comment on column flow_instance.this_company is
'��Ͻ'
/

comment on column flow_instance.pre_insid is
'ǰһʵ���ʶ'
/

/*==============================================================*/
/* Table: flow_master                                         */
/*==============================================================*/
create table flow_master  (
   flow_id            INTEGER                         not null,
   flow_name          VARCHAR2(200),
   flow_orgid         INTEGER,
   flow_memo          VARCHAR2(200),
   constraint PK_FLOW_MASTER primary key (flow_id)
)
/

comment on table flow_master is
'���'
/

comment on column flow_master.flow_id is
'��̱�ʶ'
/

comment on column flow_master.flow_name is
'������'
/

comment on column flow_master.flow_orgid is
'������֯'
/

comment on column flow_master.flow_memo is
'���˵��'
/

/*==============================================================*/
/* Table: flow_orgchart                                       */
/*==============================================================*/
create table flow_orgchart  (
   flow_orgid         INTEGER                         not null,
   flow_orgname       VARCHAR2(50),
   flow_orgsupid      INTEGER,
   company_code       VARCHAR2(32),
   flow_orgmemo       VARCHAR2(200),
   is_waitall         INTEGER,
   flow_url           VARCHAR2(200),
   constraint PK_FLOW_ORGCHART primary key (flow_orgid)
)
/

comment on table flow_orgchart is
'�����֯�ܹ�'
/

comment on column flow_orgchart.flow_orgid is
'��֯�ܹ���ʶ'
/

comment on column flow_orgchart.flow_orgname is
'��֯�ܹ����'
/

comment on column flow_orgchart.flow_orgsupid is
'��֯�ܹ��ϼ�'
/

comment on column flow_orgchart.company_code is
'��Ӧ�ͻ�'
/

comment on column flow_orgchart.flow_orgmemo is
'˵��'
/

comment on column flow_orgchart.is_waitall is
'�ȴ��¼�������'
/

comment on column flow_orgchart.flow_url is
'��Ӧҳ��'
/

/*==============================================================*/
/* Table: flow_role                                           */
/*==============================================================*/
create table flow_role  (
   flow_roleid        VARCHAR2(32)                    not null,
   flow_rolename      VARCHAR2(50),
   flow_orgid         INTEGER,
   flow_rolememo      VARCHAR2(200),
   flow_rolecode      VARCHAR2(50),
   constraint PK_FLOW_ROLE primary key (flow_roleid)
)
/

comment on table flow_role is
'��̽�ɫ'
/

comment on column flow_role.flow_roleid is
'��ɫ��ʶ'
/

comment on column flow_role.flow_rolename is
'��ɫ���'
/

comment on column flow_role.flow_orgid is
'������֯'
/

comment on column flow_role.flow_rolememo is
'��ɫ˵��'
/

comment on column flow_role.flow_rolecode is
'��ɫ����'
/

/*==============================================================*/
/* Table: flow_roleuser                                       */
/*==============================================================*/
create table flow_roleuser  (
   flow_roleid        VARCHAR2(32),
   flow_userid        VARCHAR2(32)
)
/

comment on table flow_roleuser is
'��ɫ���ʺŶ�Ӧ'
/

comment on column flow_roleuser.flow_roleid is
'��ɫ��ʶ'
/

comment on column flow_roleuser.flow_userid is
'�ʺű�ʶ'
/

/*==============================================================*/
/* Table: flow_runinfo                                        */
/*==============================================================*/
create table flow_runinfo  (
   runinfo_id         INTEGER                         not null,
   flow_id            INTEGER,
   flow_insid         INTEGER,
   step_id            INTEGER,
   step_role          VARCHAR2(32),
   step_user          VARCHAR2(32),
   start_date         DATE,
   end_date           DATE,
   flow_action        INTEGER,
   flow_memo          VARCHAR2(200),
   constraint PK_FLOW_RUNINFO primary key (runinfo_id)
)
/

comment on table flow_runinfo is
'�����˼�¼'
/

comment on column flow_runinfo.runinfo_id is
'��¼��ʶ'
/

comment on column flow_runinfo.flow_id is
'��̱�ʶ'
/

comment on column flow_runinfo.flow_insid is
'ʵ���ʶ'
/

comment on column flow_runinfo.step_id is
'�����ʶ'
/

comment on column flow_runinfo.step_role is
'ִ�н�ɫ'
/

comment on column flow_runinfo.step_user is
'ִ����'
/

comment on column flow_runinfo.start_date is
'��ʼ����ʱ��'
/

comment on column flow_runinfo.end_date is
'��������ʱ��'
/

comment on column flow_runinfo.flow_action is
'��̶���'
/

comment on column flow_runinfo.flow_memo is
'������'
/

/*==============================================================*/
/* Table: flow_runnext                                        */
/*==============================================================*/
create table flow_runnext  (
   flow_id            INTEGER                         not null,
   flow_insid         INTEGER,
   step_id            INTEGER,
   flow_status        VARCHAR2(2),
   step_runtype       INTEGER,
   step_role          VARCHAR2(32),
   step_user          VARCHAR2(32),
   start_date         DATE,
   end_date           DATE,
   step_type          CHAR(1),
   constraint PK_FLOW_RUNNEXT primary key (flow_id)
)
/

comment on table flow_runnext is
'���ִ��'
/

comment on column flow_runnext.flow_id is
'��̱�ʶ'
/

comment on column flow_runnext.flow_insid is
'ʵ���ʶ'
/

comment on column flow_runnext.step_id is
'�����ʶ'
/

comment on column flow_runnext.flow_status is
'״̬'
/

comment on column flow_runnext.step_runtype is
'����ִ��������'
/

comment on column flow_runnext.step_role is
'ִ�н�ɫ'
/

comment on column flow_runnext.step_user is
'ִ����'
/

comment on column flow_runnext.start_date is
'��ʼ����ʱ��'
/

comment on column flow_runnext.end_date is
'��������ʱ��'
/

comment on column flow_runnext.step_type is
'��������'
/

/*==============================================================*/
/* Table: flow_step                                           */
/*==============================================================*/
create table flow_step  (
   step_id            INTEGER                         not null,
   flow_id            INTEGER,
   step_name          VARCHAR2(50),
   next_step          INTEGER,
   step_type          CHAR(1),
   allow_return       INTEGER,
   step_memo          VARCHAR2(200),
   constraint PK_FLOW_STEP primary key (step_id)
)
/

comment on table flow_step is
'��̲���'
/

comment on column flow_step.step_id is
'�����ʶ'
/

comment on column flow_step.flow_id is
'��̱�ʶ'
/

comment on column flow_step.step_name is
'�������'
/

comment on column flow_step.next_step is
'���ò���'
/

comment on column flow_step.step_type is
'��������'
/

comment on column flow_step.allow_return is
'�����˻�'
/

comment on column flow_step.step_memo is
'����˵��'
/

/*==============================================================*/
/* Table: flow_steprun                                        */
/*==============================================================*/
create table flow_steprun  (
   run_id             INTEGER                         not null,
   flow_id            INTEGER,
   step_id            INTEGER,
   run_type           INTEGER,
   run_user           VARCHAR2(32),
   constraint PK_FLOW_STEPRUN primary key (run_id)
)
/

comment on table flow_steprun is
'���ִ����'
/

comment on column flow_steprun.run_id is
'ִ���˱�ʶ'
/

comment on column flow_steprun.flow_id is
'��̱�ʶ'
/

comment on column flow_steprun.step_id is
'�����ʶ'
/

comment on column flow_steprun.run_type is
'ִ�������'
/

comment on column flow_steprun.run_user is
'ִ����'
/

/*==============================================================*/
/* Table: flow_user                                           */
/*==============================================================*/
create table flow_user  (
   flow_userid        VARCHAR2(32)                    not null,
   flow_username      VARCHAR2(50),
   flow_useremail     VARCHAR2(50),
   flow_usermobile    VARCHAR2(20),
   flow_orgid         INTEGER,
   flow_usercode      VARCHAR2(50),
   constraint PK_FLOW_USER primary key (flow_userid)
)
/

comment on table flow_user is
'����ʺ�'
/

comment on column flow_user.flow_userid is
'�ʺű�ʶ'
/

comment on column flow_user.flow_username is
'��ʾ���'
/

comment on column flow_user.flow_useremail is
'�����ʼ�'
/

comment on column flow_user.flow_usermobile is
'�ֻ����'
/

comment on column flow_user.flow_orgid is
'������֯'
/

comment on column flow_user.flow_usercode is
'�ʺű���'
/

/*==============================================================*/
/* Table: imp_table                                           */
/*==============================================================*/
create table imp_table  (
   employee_id        VARCHAR2(20),
   company_code       VARCHAR2(20)
)
/

comment on table imp_table is
'imp_table'
/

comment on column imp_table.employee_id is
'employee_id'
/

comment on column imp_table.company_code is
'company_code'
/

/*==============================================================*/
/* Table: pay_class                                           */
/*==============================================================*/
create table pay_class  (
   pay_class_id       INTEGER                         not null,
   company_code       VARCHAR2(32)                    not null,
   pay_class_name     VARCHAR2(150),
   is_valid           SMALLINT,
   tax_setting        SMALLINT,
   payday             SMALLINT,
   if_calculate       SMALLINT                       default 1,
   if_si              SMALLINT,
   si_shift           smallint,
   tax_code           integer,
   lastuse_date       DATE,
   pay_min            number(9,2),
   creator_code       INTEGER,
   creat_date         date,
   modifier_code      INTEGER,
   modify_date        date,
   payrule            number(9,2),
   day_shift          INTEGER,
   constraint PK_PAY_CLASS primary key (pay_class_id)
)
/

comment on table pay_class is
'н�����'
/

comment on column pay_class.pay_class_id is
'��ʶ'
/

comment on column pay_class.company_code is
'�ͻ���ʶ'
/

comment on column pay_class.pay_class_name is
'���'
/

comment on column pay_class.is_valid is
'�Ƿ���Ч'
/

comment on column pay_class.tax_setting is
'�Ƿ��ɸ�˰'
/

comment on column pay_class.payday is
'���ʷ�����'
/

comment on column pay_class.if_calculate is
'�Ƿ����'
/

comment on column pay_class.if_si is
'�Ƿ�-�籣'
/

comment on column pay_class.si_shift is
'�籣��Ӧ�£�λ�ƣ�'
/

comment on column pay_class.tax_code is
'��Ӧ˰�ʱ�'
/

comment on column pay_class.lastuse_date is
'���ʹ������'
/

comment on column pay_class.pay_min is
'��͹���'
/

comment on column pay_class.creator_code is
'�����˱��'
/

comment on column pay_class.creat_date is
'����ʱ��'
/

comment on column pay_class.modifier_code is
'�޸��˱��'
/

comment on column pay_class.modify_date is
'�޸�ʱ��'
/

comment on column pay_class.payrule is
'�¹̶���н����'
/

comment on column pay_class.day_shift is
'��н����λ��'
/

/*==============================================================*/
/* Table: pay_class_his                                       */
/*==============================================================*/
create table pay_class_his  (
   his_id             integer                         not null,
   pay_class_id       INTEGER                         not null,
   company_code       VARCHAR2(32)                    not null,
   pay_class_name     VARCHAR2(150),
   is_valid           SMALLINT,
   tax_setting        SMALLINT,
   payday             SMALLINT,
   if_calculate       SMALLINT,
   if_si              SMALLINT,
   creator_code       INTEGER,
   creat_date         date,
   modifier_code      INTEGER,
   modify_date        date,
   datanode           integer,
   si_shift           smallint,
   tax_code           integer,
   lastuse_date       DATE,
   pay_min            number(9,2),
   period             VARCHAR2(10),
   payrule            number(9,2),
   day_shift          INTEGER,
   constraint PK_PAY_CLASS_HIS primary key (his_id, pay_class_id)
)
/

comment on table pay_class_his is
'н�������ʷ��'
/

comment on column pay_class_his.his_id is
'��ʷ��¼��ʶ'
/

comment on column pay_class_his.pay_class_id is
'��ʶ'
/

comment on column pay_class_his.company_code is
'�ͻ���ʶ'
/

comment on column pay_class_his.pay_class_name is
'���'
/

comment on column pay_class_his.is_valid is
'�Ƿ���Ч'
/

comment on column pay_class_his.tax_setting is
'�Ƿ��ɸ�˰'
/

comment on column pay_class_his.payday is
'���ʷ�����'
/

comment on column pay_class_his.if_calculate is
'�Ƿ����'
/

comment on column pay_class_his.if_si is
'�Ƿ�-�籣'
/

comment on column pay_class_his.creator_code is
'�����˱��'
/

comment on column pay_class_his.creat_date is
'����ʱ��'
/

comment on column pay_class_his.modifier_code is
'�޸��˱��'
/

comment on column pay_class_his.modify_date is
'�޸�ʱ��'
/

comment on column pay_class_his.datanode is
'�������ʾ'
/

comment on column pay_class_his.si_shift is
'�籣��Ӧ�£�λ�ƣ�'
/

comment on column pay_class_his.tax_code is
'��Ӧ˰�ʱ�'
/

comment on column pay_class_his.lastuse_date is
'���ʹ������'
/

comment on column pay_class_his.pay_min is
'��͹���'
/

comment on column pay_class_his.period is
'��Ӧ�����·�'
/

comment on column pay_class_his.payrule is
'�¹̶���н����'
/

comment on column pay_class_his.day_shift is
'��н����λ��'
/

/*==============================================================*/
/* Table: pay_classitem                                       */
/*==============================================================*/
create table pay_classitem  (
   pay_classitem_id   INTEGER                         not null,
   company_code       VARCHAR2(32)                    not null,
   pay_class_id       INTEGER                         not null,
   name               VARCHAR2(50),
   segment1           VARCHAR2(2000),
   segment2           VARCHAR2(200),
   segment3           VARCHAR2(200),
   in_tax             SMALLINT,
   data_come          SMALLINT,
   zero_nextmonth     SMALLINT,
   is_limited         SMALLINT,
   memo               VARCHAR2(200),
   is_valid           SMALLINT                       default 1,
   is_add             smallint,
   is_display         smallint                       default 1,
   display_order      smallint,
   segment_order      smallint,
   calculate_order    smallint,
   bonus_option       smallint                       default -1,
   month              smallint                       default 0,
   is_fixed           smallint                       default 0,
   precision          smallint                       default 2,
   FORMULA_TMP          VARCHAR2(2000),
   FORMULA_TMP1         VARCHAR2(2000),
   FORMULA_TMP2         VARCHAR2(2000),
   creator_code       INTEGER,
   creat_date         date,
   modifier_code      INTEGER,
   modify_date        date,
   value_type         INTEGER,
   is_subsection      INTEGER,
   datatype           CHAR(1)                        default 'N',
   functiontype       VARCHAR2(100),
   functionitem       VARCHAR2(100),
   functionmemo1      VARCHAR2(100),
   constraint PK_PAY_CLASSITEM primary key (pay_classitem_id)
)
/

comment on table pay_classitem is
'н����Ŀ��'
/

comment on column pay_classitem.pay_classitem_id is
'��ʶ'
/

comment on column pay_classitem.company_code is
'�ͻ���ʶ'
/

comment on column pay_classitem.pay_class_id is
'н������ʶ'
/

comment on column pay_classitem.name is
'н����Ŀ���'
/

comment on column pay_classitem.segment1 is
'������1'
/

comment on column pay_classitem.segment2 is
'������2'
/

comment on column pay_classitem.segment3 is
'������3'
/

comment on column pay_classitem.in_tax is
'�Ƿ��˰'
/

comment on column pay_classitem.data_come is
'���4Դ'
/

comment on column pay_classitem.zero_nextmonth is
'�����Ƿ�����'
/

comment on column pay_classitem.is_limited is
'�Ƿ���ʱ������'
/

comment on column pay_classitem.memo is
'����'
/

comment on column pay_classitem.is_valid is
'�Ƿ���Ч'
/

comment on column pay_classitem.is_add is
'���������'
/

comment on column pay_classitem.is_display is
'�Ƿ���ʾ'
/

comment on column pay_classitem.display_order is
'��ʾ˳��'
/

comment on column pay_classitem.segment_order is
'��Ӧ��������'
/

comment on column pay_classitem.calculate_order is
'����˳��'
/

comment on column pay_classitem.bonus_option is
'����ѡ��'
/

comment on column pay_classitem.month is
'����λ��'
/

comment on column pay_classitem.is_fixed is
'�Ƿ�̶���'
/

comment on column pay_classitem.precision is
'С��λ��'
/

comment on column pay_classitem.FORMULA_TMP is
'��ʽ���ֶ�'
/

comment on column pay_classitem.FORMULA_TMP1 is
'��ʽ��ʾ���ֶ�1'
/

comment on column pay_classitem.FORMULA_TMP2 is
'��ʽ��ʾ���ֶ�2'
/

comment on column pay_classitem.creator_code is
'�����˱��'
/

comment on column pay_classitem.creat_date is
'����ʱ��'
/

comment on column pay_classitem.modifier_code is
'�޸��˱��'
/

comment on column pay_classitem.modify_date is
'�޸�ʱ��'
/

comment on column pay_classitem.value_type is
'�������'
/

comment on column pay_classitem.is_subsection is
'����ֶμ���'
/

comment on column pay_classitem.datatype is
'�������'
/

comment on column pay_classitem.functiontype is
'ϵͳ�������'
/

comment on column pay_classitem.functionitem is
'ϵͳ�������'
/

comment on column pay_classitem.functionmemo1 is
'ϵͳ����id'
/

/*==============================================================*/
/* Table: pay_classitem_his                                   */
/*==============================================================*/
create table pay_classitem_his  (
   his_id             integer                         not null,
   pay_classitem_id   INTEGER                         not null,
   company_code       VARCHAR2(32)                    not null,
   pay_class_id       INTEGER                         not null,
   name               VARCHAR2(50),
   segment1           VARCHAR2(2000),
   segment2           VARCHAR2(200),
   segment3           VARCHAR2(200),
   in_tax             SMALLINT,
   data_come          SMALLINT,
   zero_nextmonth     SMALLINT,
   is_limited         SMALLINT,
   memo               VARCHAR2(200),
   is_valid           SMALLINT                       default 1,
   datanode           integer,
   is_add             smallint,
   is_display         smallint,
   display_order      smallint,
   calculate_order    smallint,
   bonus_option       smallint,
   month              smallint,
   segment_order      smallint,
   is_fixed           smallint                       default 0,
   precision          smallint                       default 2,
   FORMULA_TMP          VARCHAR2(2000),
   FORMULA_TMP1         VARCHAR2(2000),
   FORMULA_TMP2         VARCHAR2(2000),
   creator_id         INTEGER,
   create_code        VARCHAR(20),
   create_date        DATE                           default SYSDATE,
   creator_IP         VARCHAR(20),
   modifier_id        INTEGER,
   modifier_code      VARCHAR(20),
   modifier_date      date                           default SYSDATE,
   modifier_IP        VARCHAR(20),
   is_subsection      INTEGER,
   datatype           CHAR(1)                        default 'N',
   functiontype       VARCHAR2(100),
   functionitem       VARCHAR2(100),
   functionmemo1      VARCHAR2(100),
   constraint PK_PAY_CLASSITEM_HIS primary key (his_id, pay_classitem_id)
)
/

comment on table pay_classitem_his is
'н����Ŀ����ʷ��'
/

comment on column pay_classitem_his.his_id is
'��ʷ��¼��ʶ'
/

comment on column pay_classitem_his.pay_classitem_id is
'��ʶ'
/

comment on column pay_classitem_his.company_code is
'�ͻ���ʶ'
/

comment on column pay_classitem_his.pay_class_id is
'н������ʶ'
/

comment on column pay_classitem_his.name is
'н����Ŀ���'
/

comment on column pay_classitem_his.segment1 is
'������1'
/

comment on column pay_classitem_his.segment2 is
'������2'
/

comment on column pay_classitem_his.segment3 is
'������3'
/

comment on column pay_classitem_his.in_tax is
'�Ƿ��˰'
/

comment on column pay_classitem_his.data_come is
'���4Դ'
/

comment on column pay_classitem_his.zero_nextmonth is
'�����Ƿ�����'
/

comment on column pay_classitem_his.is_limited is
'�Ƿ���ʱ������'
/

comment on column pay_classitem_his.memo is
'����'
/

comment on column pay_classitem_his.is_valid is
'�Ƿ���Ч'
/

comment on column pay_classitem_his.datanode is
'�������ʾ'
/

comment on column pay_classitem_his.is_add is
'���������'
/

comment on column pay_classitem_his.is_display is
'�Ƿ���ʾ'
/

comment on column pay_classitem_his.display_order is
'��ʾ˳��'
/

comment on column pay_classitem_his.calculate_order is
'����˳��'
/

comment on column pay_classitem_his.bonus_option is
'����ѡ��'
/

comment on column pay_classitem_his.month is
'����λ��'
/

comment on column pay_classitem_his.segment_order is
'��Ӧ��������'
/

comment on column pay_classitem_his.is_fixed is
'�Ƿ�̶���'
/

comment on column pay_classitem_his.precision is
'С��λ��'
/

comment on column pay_classitem_his.FORMULA_TMP is
'��ʽ���ֶ�'
/

comment on column pay_classitem_his.FORMULA_TMP1 is
'��ʽ��ʾ���ֶ�1'
/

comment on column pay_classitem_his.FORMULA_TMP2 is
'��ʽ��ʾ���ֶ�2'
/

comment on column pay_classitem_his.creator_id is
'�����˱��'
/

comment on column pay_classitem_his.create_code is
'�������ʺ�'
/

comment on column pay_classitem_his.create_date is
'����ʱ��'
/

comment on column pay_classitem_his.creator_IP is
'������IP'
/

comment on column pay_classitem_his.modifier_id is
'�޸��˱��'
/

comment on column pay_classitem_his.modifier_code is
'�޸����ʺ�'
/

comment on column pay_classitem_his.modifier_date is
'�޸�ʱ��'
/

comment on column pay_classitem_his.modifier_IP is
'�޸���IP'
/

comment on column pay_classitem_his.is_subsection is
'����ֶμ���'
/

comment on column pay_classitem_his.datatype is
'�������'
/

comment on column pay_classitem_his.functiontype is
'ϵͳ�������'
/

comment on column pay_classitem_his.functionitem is
'ϵͳ�������'
/

comment on column pay_classitem_his.functionmemo1 is
'ϵͳ����id'
/

/*==============================================================*/
/* Table: pay_classitem_limitdate                             */
/*==============================================================*/
create table pay_classitem_limitdate  (
   limitdate_id       integer                         not null,
   pay_classitem_id   integer,
   start_date         date,
   end_date           date,
   company_code       VARCHAR2(32)                    not null,
   pay_class_id       INTEGER                         not null,
   creator_code       INTEGER,
   creat_date         date,
   modifier_code      INTEGER,
   modify_date        date,
   constraint PK_PAY_CLASSITEM_LIMITDATE primary key (limitdate_id)
)
/

comment on table pay_classitem_limitdate is
'н����Ŀʱ�����Ʊ�'
/

comment on column pay_classitem_limitdate.limitdate_id is
'��ʶ'
/

comment on column pay_classitem_limitdate.pay_classitem_id is
'н����Ŀ��ʶ'
/

comment on column pay_classitem_limitdate.start_date is
'��ʼ����'
/

comment on column pay_classitem_limitdate.end_date is
'��ֹ����'
/

comment on column pay_classitem_limitdate.company_code is
'�ͻ���ʶ'
/

comment on column pay_classitem_limitdate.pay_class_id is
'н������ʶ'
/

comment on column pay_classitem_limitdate.creator_code is
'�����˱��'
/

comment on column pay_classitem_limitdate.creat_date is
'����ʱ��'
/

comment on column pay_classitem_limitdate.modifier_code is
'�޸��˱��'
/

comment on column pay_classitem_limitdate.modify_date is
'�޸�ʱ��'
/

/*==============================================================*/
/* Table: pay_classitem_limitdate_his                         */
/*==============================================================*/
create table pay_classitem_limitdate_his  (
   his_id             integer                         not null,
   limitdate_id       integer                         not null,
   pay_classitem_id   integer,
   start_date         date,
   end_date           date,
   company_code       VARCHAR2(32)                    not null,
   pay_class_id       INTEGER                         not null,
   creator_code       INTEGER,
   creat_date         date,
   modifier_code      INTEGER,
   modify_date        date,
   constraint PK_PAY_CLASSITEM_LIMITDATE_HIS primary key (his_id, limitdate_id)
)
/

comment on table pay_classitem_limitdate_his is
'н����Ŀʱ�����Ʊ���ʷ��'
/

comment on column pay_classitem_limitdate_his.his_id is
'��ʷ��¼��ʶ'
/

comment on column pay_classitem_limitdate_his.limitdate_id is
'��ʶ'
/

comment on column pay_classitem_limitdate_his.pay_classitem_id is
'н����Ŀ��ʶ'
/

comment on column pay_classitem_limitdate_his.start_date is
'��ʼ����'
/

comment on column pay_classitem_limitdate_his.end_date is
'��ֹ����'
/

comment on column pay_classitem_limitdate_his.company_code is
'�ͻ���ʶ'
/

comment on column pay_classitem_limitdate_his.pay_class_id is
'н������ʶ'
/

comment on column pay_classitem_limitdate_his.creator_code is
'�����˱��'
/

comment on column pay_classitem_limitdate_his.creat_date is
'����ʱ��'
/

comment on column pay_classitem_limitdate_his.modifier_code is
'�޸��˱��'
/

comment on column pay_classitem_limitdate_his.modify_date is
'�޸�ʱ��'
/

/*==============================================================*/
/* Table: pay_data                                            */
/*==============================================================*/
create table pay_data  (
   pay_id             INTEGER                         not null,
   his_id             integer                         not null,
   company_code       VARCHAR2(32)                    not null,
   employee_id        INTEGER                         not null,
   pay_class_id       INTEGER                         not null,
   period             VARCHAR2(10),
   status             SMALLINT                       default 0,
   modifier_code      INTEGER,
   modify_date        date,
   creator_code       INTEGER,
   creat_date         date,
   confirmation_code  INTEGER,
   confirmation_date  date,
   datanode           integer,
   segment1           VARCHAR2(100),
   segment3           VARCHAR2(100),
   segment2           VARCHAR2(100),
   segment4           VARCHAR2(100),
   segment5           VARCHAR2(100),
   segment6           VARCHAR2(100),
   segment7           VARCHAR2(100),
   segment8           VARCHAR2(100),
   segment9           VARCHAR2(100),
   segment10          VARCHAR2(100),
   segment11          VARCHAR2(100),
   segment12          VARCHAR2(100),
   segment13          VARCHAR2(100),
   segment14          VARCHAR2(100),
   segment15          VARCHAR2(100),
   segment16          VARCHAR2(100),
   segment17          VARCHAR2(100),
   segment18          VARCHAR2(100),
   segment19          VARCHAR2(100),
   segment20          VARCHAR2(100),
   segment21          VARCHAR2(100),
   segment22          VARCHAR2(100),
   segment23          VARCHAR2(100),
   segment24          VARCHAR2(100),
   segment25          VARCHAR2(100),
   segment26          VARCHAR2(100),
   segment27          VARCHAR2(100),
   segment28          VARCHAR2(100),
   segment29          VARCHAR2(100),
   segment30          VARCHAR2(100),
   segment31          VARCHAR2(100),
   segment32          VARCHAR2(100),
   segment33          VARCHAR2(100),
   segment34          VARCHAR2(100),
   segment35          VARCHAR2(100),
   segment36          VARCHAR2(100),
   segment37          VARCHAR2(100),
   segment38          VARCHAR2(100),
   segment39          VARCHAR2(100),
   segment40          VARCHAR2(100),
   segment41          VARCHAR2(100),
   segment42          VARCHAR2(100),
   segment43          VARCHAR2(100),
   segment44          VARCHAR2(100),
   segment45          VARCHAR2(100),
   segment46          VARCHAR2(100),
   segment47          VARCHAR2(100),
   segment48          VARCHAR2(100),
   segment49          VARCHAR2(100),
   segment50          VARCHAR2(100),
   segment51          VARCHAR2(100),
   segment52          VARCHAR2(100),
   segment53          VARCHAR2(100),
   segment54          VARCHAR2(100),
   segment55          VARCHAR2(100),
   segment56          VARCHAR2(100),
   segment57          VARCHAR2(100),
   segment58          VARCHAR2(100),
   segment59          VARCHAR2(100),
   segment60          VARCHAR2(100),
   segment61          VARCHAR2(100),
   segment62          VARCHAR2(100),
   segment63          VARCHAR2(100),
   segment64          VARCHAR2(100),
   segment65          VARCHAR2(100),
   segment66          VARCHAR2(100),
   segment67          VARCHAR2(100),
   segment68          VARCHAR2(100),
   segment69          VARCHAR2(100),
   segment70          VARCHAR2(100),
   segment71          VARCHAR2(100),
   segment72          VARCHAR2(100),
   segment73          VARCHAR2(100),
   segment74          VARCHAR2(100),
   segment75          VARCHAR2(100),
   segment76          VARCHAR2(100),
   segment77          VARCHAR2(100),
   segment78          VARCHAR2(100),
   segment79          VARCHAR2(100),
   segment80          VARCHAR2(100),
   segment81          VARCHAR2(100),
   segment82          VARCHAR2(100),
   segment83          VARCHAR2(100),
   segment84          VARCHAR2(100),
   segment85          VARCHAR2(100),
   segment86          VARCHAR2(100),
   segment87          VARCHAR2(100),
   segment88          VARCHAR2(100),
   segment89          VARCHAR2(100),
   segment90          VARCHAR2(100),
   segment91          VARCHAR2(100),
   segment92          VARCHAR2(100),
   segment93          VARCHAR2(100),
   segment94          VARCHAR2(100),
   segment95          VARCHAR2(100),
   segment96          VARCHAR2(100),
   segment97          VARCHAR2(100),
   segment98          VARCHAR2(100),
   segment99          VARCHAR2(100),
   segment100         VARCHAR2(100),
   segment101         VARCHAR2(100),
   segment102         VARCHAR2(100),
   segment103         VARCHAR2(100),
   segment104         VARCHAR2(100),
   segment105         VARCHAR2(100),
   segment106         VARCHAR2(100),
   segment107         VARCHAR2(100),
   segment108         VARCHAR2(100),
   segment109         VARCHAR2(100),
   segment110         VARCHAR2(100),
   segment111         VARCHAR2(100),
   segment112         VARCHAR2(100),
   segment113         VARCHAR2(100),
   segment114         VARCHAR2(100),
   segment115         VARCHAR2(100),
   segment116         VARCHAR2(100),
   segment117         VARCHAR2(100),
   segment118         VARCHAR2(100),
   segment119         VARCHAR2(100),
   segment120         VARCHAR2(100),
   segment121         VARCHAR2(100),
   segment122         VARCHAR2(100),
   segment123         VARCHAR2(100),
   segment124         VARCHAR2(100),
   segment125         VARCHAR2(100),
   segment126         VARCHAR2(100),
   segment127         VARCHAR2(100),
   segment128         VARCHAR2(100),
   segment129         VARCHAR2(100),
   segment130         VARCHAR2(100),
   segment131         VARCHAR2(100),
   segment132         VARCHAR2(100),
   segment133         VARCHAR2(100),
   segment134         VARCHAR2(100),
   segment135         VARCHAR2(100),
   segment136         VARCHAR2(100),
   segment137         VARCHAR2(100),
   segment138         VARCHAR2(100),
   segment139         VARCHAR2(100),
   segment140         VARCHAR2(100),
   segment141         VARCHAR2(100),
   segment142         VARCHAR2(100),
   segment143         VARCHAR2(100),
   segment144         VARCHAR2(100),
   segment145         VARCHAR2(100),
   segment146         VARCHAR2(100),
   segment147         VARCHAR2(100),
   segment148         VARCHAR2(100),
   segment149         VARCHAR2(100),
   segment150         VARCHAR2(100),
   segment151         VARCHAR2(100),
   segment152         VARCHAR2(100),
   segment153         VARCHAR2(100),
   segment154         VARCHAR2(100),
   segment155         VARCHAR2(100),
   segment156         VARCHAR2(100),
   segment157         VARCHAR2(100),
   segment158         VARCHAR2(100),
   segment159         VARCHAR2(100),
   segment160         VARCHAR2(100),
   segment161         VARCHAR2(100),
   segment162         VARCHAR2(100),
   segment163         VARCHAR2(100),
   segment164         VARCHAR2(100),
   segment165         VARCHAR2(100),
   segment166         VARCHAR2(100),
   segment167         VARCHAR2(100),
   segment168         VARCHAR2(100),
   segment169         VARCHAR2(100),
   segment170         VARCHAR2(100),
   segment171         VARCHAR2(100),
   segment172         VARCHAR2(100),
   segment173         VARCHAR2(100),
   segment174         VARCHAR2(100),
   segment175         VARCHAR2(100),
   segment176         VARCHAR2(100),
   segment177         VARCHAR2(100),
   segment178         VARCHAR2(100),
   segment179         VARCHAR2(100),
   segment180         VARCHAR2(100),
   segment181         VARCHAR2(100),
   segment182         VARCHAR2(100),
   segment183         VARCHAR2(100),
   segment184         VARCHAR2(100),
   segment185         VARCHAR2(100),
   segment186         VARCHAR2(100),
   segment187         VARCHAR2(100),
   segment188         VARCHAR2(100),
   segment189         VARCHAR2(100),
   segment190         VARCHAR2(100),
   segment191         VARCHAR2(100),
   segment192         VARCHAR2(100),
   segment193         VARCHAR2(100),
   segment194         VARCHAR2(100),
   segment195         VARCHAR2(100),
   segment196         VARCHAR2(100),
   segment197         VARCHAR2(100),
   segment198         VARCHAR2(100),
   segment199         VARCHAR2(100),
   segment200         VARCHAR2(100),
   segment201         VARCHAR2(100),
   segment202         VARCHAR2(100),
   segment203         VARCHAR2(100),
   segment204         VARCHAR2(100),
   segment205         VARCHAR2(100),
   segment206         VARCHAR2(100),
   segment207         VARCHAR2(100),
   segment208         VARCHAR2(100),
   segment209         VARCHAR2(100),
   segment210         VARCHAR2(100),
   segment211         VARCHAR2(100),
   segment212         VARCHAR2(100),
   segment213         VARCHAR2(100),
   segment214         VARCHAR2(100),
   segment215         VARCHAR2(100),
   segment216         VARCHAR2(100),
   segment217         VARCHAR2(100),
   segment218         VARCHAR2(100),
   segment219         VARCHAR2(100),
   segment220         VARCHAR2(100),
   segment221         VARCHAR2(100),
   segment222         VARCHAR2(100),
   segment223         VARCHAR2(100),
   segment224         VARCHAR2(100),
   segment225         VARCHAR2(100),
   segment226         VARCHAR2(100),
   segment227         VARCHAR2(100),
   segment228         VARCHAR2(100),
   segment229         VARCHAR2(100),
   segment230         VARCHAR2(100),
   segment231         VARCHAR2(100),
   segment232         VARCHAR2(100),
   segment233         VARCHAR2(100),
   segment234         VARCHAR2(100),
   segment235         VARCHAR2(100),
   segment236         VARCHAR2(100),
   segment237         VARCHAR2(100),
   segment238         VARCHAR2(100),
   segment239         VARCHAR2(100),
   segment240         VARCHAR2(100),
   segment241         VARCHAR2(100),
   segment242         VARCHAR2(100),
   segment243         VARCHAR2(100),
   segment244         VARCHAR2(100),
   segment245         VARCHAR2(100),
   segment246         VARCHAR2(100),
   segment247         VARCHAR2(100),
   segment248         VARCHAR2(100),
   segment249         VARCHAR2(100),
   segment250         VARCHAR2(100),
   segment251         VARCHAR2(100),
   segment252         VARCHAR2(100),
   segment253         VARCHAR2(100),
   segment254         VARCHAR2(100),
   segment255         VARCHAR2(100),
   constraint PK_PAY_DATA primary key (pay_id)
)
/

comment on table pay_data is
'н�ʼ�¼'
/

comment on column pay_data.pay_id is
'��ʶ'
/

comment on column pay_data.his_id is
'��ʷ��¼��ʶ'
/

comment on column pay_data.company_code is
'�ͻ���ʶ'
/

comment on column pay_data.employee_id is
'��Ա��ʶ'
/

comment on column pay_data.pay_class_id is
'н��ģ��id'
/

comment on column pay_data.period is
'����·�'
/

comment on column pay_data.status is
'Ĭ��0����ʾ�����¼��2��ʾ�Ѿ����ţ�'
/

comment on column pay_data.modifier_code is
'����޸��˱��'
/

comment on column pay_data.modify_date is
'����޸�ʱ��'
/

comment on column pay_data.creator_code is
'�����˱��'
/

comment on column pay_data.creat_date is
'����ʱ��'
/

comment on column pay_data.confirmation_code is
'ȷ���˱��'
/

comment on column pay_data.confirmation_date is
'ȷ��ʱ��'
/

comment on column pay_data.datanode is
'�������ʾ'
/

comment on column pay_data.segment1 is
'������1'
/

comment on column pay_data.segment3 is
'������3'
/

comment on column pay_data.segment2 is
'������2'
/

comment on column pay_data.segment4 is
'������4'
/

comment on column pay_data.segment5 is
'������5'
/

comment on column pay_data.segment6 is
'������6'
/

comment on column pay_data.segment7 is
'������7'
/

comment on column pay_data.segment8 is
'������8'
/

comment on column pay_data.segment9 is
'������9'
/

comment on column pay_data.segment10 is
'������10'
/

comment on column pay_data.segment11 is
'������11'
/

comment on column pay_data.segment12 is
'������12'
/

comment on column pay_data.segment13 is
'������13'
/

comment on column pay_data.segment14 is
'������14'
/

comment on column pay_data.segment15 is
'������15'
/

comment on column pay_data.segment16 is
'������16'
/

comment on column pay_data.segment17 is
'������17'
/

comment on column pay_data.segment18 is
'������18'
/

comment on column pay_data.segment19 is
'������19'
/

comment on column pay_data.segment20 is
'������20'
/

comment on column pay_data.segment21 is
'������21'
/

comment on column pay_data.segment22 is
'������22'
/

comment on column pay_data.segment23 is
'������23'
/

comment on column pay_data.segment24 is
'������24'
/

comment on column pay_data.segment25 is
'������25'
/

comment on column pay_data.segment26 is
'������26'
/

comment on column pay_data.segment27 is
'������27'
/

comment on column pay_data.segment28 is
'������28'
/

comment on column pay_data.segment29 is
'������29'
/

comment on column pay_data.segment30 is
'������30'
/

comment on column pay_data.segment31 is
'������31'
/

comment on column pay_data.segment32 is
'������32'
/

comment on column pay_data.segment33 is
'������33'
/

comment on column pay_data.segment34 is
'������34'
/

comment on column pay_data.segment35 is
'������35'
/

comment on column pay_data.segment36 is
'������36'
/

comment on column pay_data.segment37 is
'������37'
/

comment on column pay_data.segment38 is
'������38'
/

comment on column pay_data.segment39 is
'������39'
/

comment on column pay_data.segment40 is
'������40'
/

comment on column pay_data.segment41 is
'������41'
/

comment on column pay_data.segment42 is
'������42'
/

comment on column pay_data.segment43 is
'������43'
/

comment on column pay_data.segment44 is
'������44'
/

comment on column pay_data.segment45 is
'������45'
/

comment on column pay_data.segment46 is
'������46'
/

comment on column pay_data.segment47 is
'������47'
/

comment on column pay_data.segment48 is
'������48'
/

comment on column pay_data.segment49 is
'������49'
/

comment on column pay_data.segment50 is
'������50'
/

comment on column pay_data.segment51 is
'������51'
/

comment on column pay_data.segment52 is
'������52'
/

comment on column pay_data.segment53 is
'������53'
/

comment on column pay_data.segment54 is
'������54'
/

comment on column pay_data.segment55 is
'������55'
/

comment on column pay_data.segment56 is
'������56'
/

comment on column pay_data.segment57 is
'������57'
/

comment on column pay_data.segment58 is
'������58'
/

comment on column pay_data.segment59 is
'������59'
/

comment on column pay_data.segment60 is
'������60'
/

comment on column pay_data.segment61 is
'������61'
/

comment on column pay_data.segment62 is
'������62'
/

comment on column pay_data.segment63 is
'������63'
/

comment on column pay_data.segment64 is
'������64'
/

comment on column pay_data.segment65 is
'������65'
/

comment on column pay_data.segment66 is
'������66'
/

comment on column pay_data.segment67 is
'������67'
/

comment on column pay_data.segment68 is
'������68'
/

comment on column pay_data.segment69 is
'������69'
/

comment on column pay_data.segment70 is
'������70'
/

comment on column pay_data.segment71 is
'������71'
/

comment on column pay_data.segment72 is
'������72'
/

comment on column pay_data.segment73 is
'������73'
/

comment on column pay_data.segment74 is
'������74'
/

comment on column pay_data.segment75 is
'������75'
/

comment on column pay_data.segment76 is
'������76'
/

comment on column pay_data.segment77 is
'������77'
/

comment on column pay_data.segment78 is
'������78'
/

comment on column pay_data.segment79 is
'������79'
/

comment on column pay_data.segment80 is
'������80'
/

comment on column pay_data.segment81 is
'������81'
/

comment on column pay_data.segment82 is
'������82'
/

comment on column pay_data.segment83 is
'������83'
/

comment on column pay_data.segment84 is
'������84'
/

comment on column pay_data.segment85 is
'������85'
/

comment on column pay_data.segment86 is
'������86'
/

comment on column pay_data.segment87 is
'������87'
/

comment on column pay_data.segment88 is
'������88'
/

comment on column pay_data.segment89 is
'������89'
/

comment on column pay_data.segment90 is
'������90'
/

comment on column pay_data.segment91 is
'������91'
/

comment on column pay_data.segment92 is
'������92'
/

comment on column pay_data.segment93 is
'������93'
/

comment on column pay_data.segment94 is
'������94'
/

comment on column pay_data.segment95 is
'������95'
/

comment on column pay_data.segment96 is
'������96'
/

comment on column pay_data.segment97 is
'������97'
/

comment on column pay_data.segment98 is
'������98'
/

comment on column pay_data.segment99 is
'������99'
/

comment on column pay_data.segment100 is
'������100'
/

comment on column pay_data.segment101 is
'������101'
/

comment on column pay_data.segment102 is
'������102'
/

comment on column pay_data.segment103 is
'������103'
/

comment on column pay_data.segment104 is
'������104'
/

comment on column pay_data.segment105 is
'������105'
/

comment on column pay_data.segment106 is
'������106'
/

comment on column pay_data.segment107 is
'������107'
/

comment on column pay_data.segment108 is
'������108'
/

comment on column pay_data.segment109 is
'������109'
/

comment on column pay_data.segment110 is
'������110'
/

comment on column pay_data.segment111 is
'������111'
/

comment on column pay_data.segment112 is
'������112'
/

comment on column pay_data.segment113 is
'������113'
/

comment on column pay_data.segment114 is
'������114'
/

comment on column pay_data.segment115 is
'������115'
/

comment on column pay_data.segment116 is
'������116'
/

comment on column pay_data.segment117 is
'������117'
/

comment on column pay_data.segment118 is
'������118'
/

comment on column pay_data.segment119 is
'������119'
/

comment on column pay_data.segment120 is
'������120'
/

comment on column pay_data.segment121 is
'������121'
/

comment on column pay_data.segment122 is
'������122'
/

comment on column pay_data.segment123 is
'������123'
/

comment on column pay_data.segment124 is
'������124'
/

comment on column pay_data.segment125 is
'������125'
/

comment on column pay_data.segment126 is
'������126'
/

comment on column pay_data.segment127 is
'������127'
/

comment on column pay_data.segment128 is
'������128'
/

comment on column pay_data.segment129 is
'������129'
/

comment on column pay_data.segment130 is
'������130'
/

comment on column pay_data.segment131 is
'������131'
/

comment on column pay_data.segment132 is
'������132'
/

comment on column pay_data.segment133 is
'������133'
/

comment on column pay_data.segment134 is
'������134'
/

comment on column pay_data.segment135 is
'������135'
/

comment on column pay_data.segment136 is
'������136'
/

comment on column pay_data.segment137 is
'������137'
/

comment on column pay_data.segment138 is
'������138'
/

comment on column pay_data.segment139 is
'������139'
/

comment on column pay_data.segment140 is
'������140'
/

comment on column pay_data.segment141 is
'������141'
/

comment on column pay_data.segment142 is
'������142'
/

comment on column pay_data.segment143 is
'������143'
/

comment on column pay_data.segment144 is
'������144'
/

comment on column pay_data.segment145 is
'������145'
/

comment on column pay_data.segment146 is
'������146'
/

comment on column pay_data.segment147 is
'������147'
/

comment on column pay_data.segment148 is
'������148'
/

comment on column pay_data.segment149 is
'������149'
/

comment on column pay_data.segment150 is
'������150'
/

comment on column pay_data.segment151 is
'������151'
/

comment on column pay_data.segment152 is
'������152'
/

comment on column pay_data.segment153 is
'������153'
/

comment on column pay_data.segment154 is
'������154'
/

comment on column pay_data.segment155 is
'������155'
/

comment on column pay_data.segment156 is
'������156'
/

comment on column pay_data.segment157 is
'������157'
/

comment on column pay_data.segment158 is
'������158'
/

comment on column pay_data.segment159 is
'������159'
/

comment on column pay_data.segment160 is
'������160'
/

comment on column pay_data.segment161 is
'������161'
/

comment on column pay_data.segment162 is
'������162'
/

comment on column pay_data.segment163 is
'������163'
/

comment on column pay_data.segment164 is
'������164'
/

comment on column pay_data.segment165 is
'������165'
/

comment on column pay_data.segment166 is
'������166'
/

comment on column pay_data.segment167 is
'������167'
/

comment on column pay_data.segment168 is
'������168'
/

comment on column pay_data.segment169 is
'������169'
/

comment on column pay_data.segment170 is
'������170'
/

comment on column pay_data.segment171 is
'������171'
/

comment on column pay_data.segment172 is
'������172'
/

comment on column pay_data.segment173 is
'������173'
/

comment on column pay_data.segment174 is
'������174'
/

comment on column pay_data.segment175 is
'������175'
/

comment on column pay_data.segment176 is
'������176'
/

comment on column pay_data.segment177 is
'������177'
/

comment on column pay_data.segment178 is
'������178'
/

comment on column pay_data.segment179 is
'������179'
/

comment on column pay_data.segment180 is
'������180'
/

comment on column pay_data.segment181 is
'������181'
/

comment on column pay_data.segment182 is
'������182'
/

comment on column pay_data.segment183 is
'������183'
/

comment on column pay_data.segment184 is
'������184'
/

comment on column pay_data.segment185 is
'������185'
/

comment on column pay_data.segment186 is
'������186'
/

comment on column pay_data.segment187 is
'������187'
/

comment on column pay_data.segment188 is
'������188'
/

comment on column pay_data.segment189 is
'������189'
/

comment on column pay_data.segment190 is
'������190'
/

comment on column pay_data.segment191 is
'������191'
/

comment on column pay_data.segment192 is
'������192'
/

comment on column pay_data.segment193 is
'������193'
/

comment on column pay_data.segment194 is
'������194'
/

comment on column pay_data.segment195 is
'������195'
/

comment on column pay_data.segment196 is
'������196'
/

comment on column pay_data.segment197 is
'������197'
/

comment on column pay_data.segment198 is
'������198'
/

comment on column pay_data.segment199 is
'������199'
/

comment on column pay_data.segment200 is
'������200'
/

comment on column pay_data.segment201 is
'������201'
/

comment on column pay_data.segment202 is
'������202'
/

comment on column pay_data.segment203 is
'������203'
/

comment on column pay_data.segment204 is
'������204'
/

comment on column pay_data.segment205 is
'������205'
/

comment on column pay_data.segment206 is
'������206'
/

comment on column pay_data.segment207 is
'������207'
/

comment on column pay_data.segment208 is
'������208'
/

comment on column pay_data.segment209 is
'������209'
/

comment on column pay_data.segment210 is
'������210'
/

comment on column pay_data.segment211 is
'������211'
/

comment on column pay_data.segment212 is
'������212'
/

comment on column pay_data.segment213 is
'������213'
/

comment on column pay_data.segment214 is
'������214'
/

comment on column pay_data.segment215 is
'������215'
/

comment on column pay_data.segment216 is
'������216'
/

comment on column pay_data.segment217 is
'������217'
/

comment on column pay_data.segment218 is
'������218'
/

comment on column pay_data.segment219 is
'������219'
/

comment on column pay_data.segment220 is
'������220'
/

comment on column pay_data.segment221 is
'������221'
/

comment on column pay_data.segment222 is
'������222'
/

comment on column pay_data.segment223 is
'������223'
/

comment on column pay_data.segment224 is
'������224'
/

comment on column pay_data.segment225 is
'������225'
/

comment on column pay_data.segment226 is
'������226'
/

comment on column pay_data.segment227 is
'������227'
/

comment on column pay_data.segment228 is
'������228'
/

comment on column pay_data.segment229 is
'������229'
/

comment on column pay_data.segment230 is
'������230'
/

comment on column pay_data.segment231 is
'������231'
/

comment on column pay_data.segment232 is
'������232'
/

comment on column pay_data.segment233 is
'������233'
/

comment on column pay_data.segment234 is
'������234'
/

comment on column pay_data.segment235 is
'������235'
/

comment on column pay_data.segment236 is
'������236'
/

comment on column pay_data.segment237 is
'������237'
/

comment on column pay_data.segment238 is
'������238'
/

comment on column pay_data.segment239 is
'������239'
/

comment on column pay_data.segment240 is
'������240'
/

comment on column pay_data.segment241 is
'������241'
/

comment on column pay_data.segment242 is
'������242'
/

comment on column pay_data.segment243 is
'������243'
/

comment on column pay_data.segment244 is
'������244'
/

comment on column pay_data.segment245 is
'������245'
/

comment on column pay_data.segment246 is
'������246'
/

comment on column pay_data.segment247 is
'������247'
/

comment on column pay_data.segment248 is
'������248'
/

comment on column pay_data.segment249 is
'������249'
/

comment on column pay_data.segment250 is
'������250'
/

comment on column pay_data.segment251 is
'������251'
/

comment on column pay_data.segment252 is
'������252'
/

comment on column pay_data.segment253 is
'������253'
/

comment on column pay_data.segment254 is
'������254'
/

comment on column pay_data.segment255 is
'������255'
/

/*==============================================================*/
/* Table: pay_empdata                                         */
/*==============================================================*/
create table pay_empdata  (
   emp_dataid         INTEGER                         not null,
   company_code       VARCHAR2(32)                    not null,
   employee_id        INTEGER                         not null,
   pay_class_id       INTEGER                         not null,
   creator_id         INTEGER,
   creat_date         date                           default SYSDATE,
   modifier_id        INTEGER,
   modify_date        date                           default SYSDATE,
   constraint PK_PAY_EMPDATA primary key (emp_dataid)
)
/

comment on table pay_empdata is
'Ա��н�ʵ���'
/

comment on column pay_empdata.emp_dataid is
'��ʶ'
/

comment on column pay_empdata.company_code is
'�ͻ���ʾ'
/

comment on column pay_empdata.employee_id is
'Ա����ʾ'
/

comment on column pay_empdata.pay_class_id is
'н������ʾ'
/

comment on column pay_empdata.creator_id is
'�����˱��'
/

comment on column pay_empdata.creat_date is
'����ʱ��'
/

comment on column pay_empdata.modifier_id is
'�޸��˱��'
/

comment on column pay_empdata.modify_date is
'�޸�ʱ��'
/

/*==============================================================*/
/* Table: pay_empdata_his                                     */
/*==============================================================*/
create table pay_empdata_his  (
   his_id             integer                         not null,
   emp_dataid         INTEGER                         not null,
   company_code       VARCHAR2(32)                    not null,
   employee_id        INTEGER                         not null,
   pay_class_id       INTEGER                         not null,
   datanode           integer,
   creator_code       INTEGER,
   creat_date         date                           default NULL,
   modifier_code      INTEGER,
   modify_date        date                           default SYSDATE,
   constraint PK_PAY_EMPDATA_HIS primary key (his_id, emp_dataid)
)
/

comment on table pay_empdata_his is
'Ա��н�ʵ�����ʷ��'
/

comment on column pay_empdata_his.his_id is
'��ʷ��¼��ʶ'
/

comment on column pay_empdata_his.emp_dataid is
'��ʶ'
/

comment on column pay_empdata_his.company_code is
'�ͻ���ʾ'
/

comment on column pay_empdata_his.employee_id is
'Ա����ʾ'
/

comment on column pay_empdata_his.pay_class_id is
'н������ʾ'
/

comment on column pay_empdata_his.datanode is
'�������ʾ'
/

comment on column pay_empdata_his.creator_code is
'�����˱��'
/

comment on column pay_empdata_his.creat_date is
'����ʱ��'
/

comment on column pay_empdata_his.modifier_code is
'�޸��˱��'
/

comment on column pay_empdata_his.modify_date is
'�޸�ʱ��'
/

/*==============================================================*/
/* Table: pay_log                                             */
/*==============================================================*/
create table pay_log  (
   pay_code           INTEGER                         not null,
   pay_logid          INTEGER,
   company_code       varchar2(32),
   employee_id        INTEGER,
   pay_date           date,
   pay_money          NUMERIC(9,2),
   pay_check_date     date,
   pay_type           SMALLINT,
   pay_typecard       VARCHAR(50),
   datanode           integer,
   constraint PK_PAY_LOG primary key (pay_code)
)
/

comment on table pay_log is
'н�ʷ��ż�¼'
/

comment on column pay_log.pay_code is
'���ű���'
/

comment on column pay_log.pay_logid is
'��ʶ'
/

comment on column pay_log.company_code is
'�ͻ�����'
/

comment on column pay_log.employee_id is
'Ա������'
/

comment on column pay_log.pay_date is
'��������'
/

comment on column pay_log.pay_money is
'���Ž��'
/

comment on column pay_log.pay_check_date is
'ǩ������'
/

comment on column pay_log.pay_type is
'���ŷ�ʽ'
/

comment on column pay_log.pay_typecard is
'��Ӧ����'
/

comment on column pay_log.datanode is
'�������ʾ'
/

/*==============================================================*/
/* Table: pay_sumclass                                        */
/*==============================================================*/
create table pay_sumclass  (
   company_code       VARCHAR2(32)                    not null,
   pay_class_id       INTEGER                         not null,
   at_classid         INTEGER
)
/

comment on table pay_sumclass is
'�ϲ���˰���'
/

comment on column pay_sumclass.company_code is
'�ͻ���ʶ'
/

comment on column pay_sumclass.pay_class_id is
'н������ʶ'
/

comment on column pay_sumclass.at_classid is
'��Ӧн�����'
/

/*==============================================================*/
/* Table: pay_sumclass_his                                    */
/*==============================================================*/
create table pay_sumclass_his  (
   his_id             integer                         not null,
   company_code       VARCHAR2(32)                    not null,
   pay_class_id       INTEGER                         not null,
   at_classid         INTEGER
)
/

comment on table pay_sumclass_his is
'�ϲ���˰�����ʷ��'
/

comment on column pay_sumclass_his.his_id is
'��ʷ��¼��ʶ'
/

comment on column pay_sumclass_his.company_code is
'�ͻ���ʶ'
/

comment on column pay_sumclass_his.pay_class_id is
'н������ʶ'
/

comment on column pay_sumclass_his.at_classid is
'��Ӧн�����'
/

/*==============================================================*/
/* Table: pb_city                                             */
/*==============================================================*/
create table pb_city  (
   city_id            INTEGER                         not null,
   province_id        INTEGER                         not null,
   super_city_id      INTEGER,
   city_name          VARCHAR2(50),
   city_code          VARCHAR2(20),
   city_pinyin        VARCHAR2(50),
   city_abbr_pinyin   VARCHAR2(50),
   city_english_name  VARCHAR2(50),
   belong_area        SMALLINT,
   have_used          SMALLINT,
   constraint PK_PB_CITY primary key (city_id)
)
/

comment on table pb_city is
'���б�'
/

comment on column pb_city.city_id is
'��ʶ'
/

comment on column pb_city.province_id is
'ʡ�ݱ�ʶ'
/

comment on column pb_city.super_city_id is
'�ϼ����б�ʶ'
/

comment on column pb_city.city_name is
'������'
/

comment on column pb_city.city_code is
'���б���'
/

comment on column pb_city.city_pinyin is
'����ȫƴ'
/

comment on column pb_city.city_abbr_pinyin is
'���м�ƴ'
/

comment on column pb_city.city_english_name is
'Ӣ����'
/

comment on column pb_city.belong_area is
'��������'
/

comment on column pb_city.have_used is
'�Ƿ�ʹ��'
/

/*==============================================================*/
/* Table: pb_commsocial_detail                                */
/*==============================================================*/
create table pb_commsocial_detail  (
   template_id        INTEGER                         not null,
   social_security_id INTEGER                         not null
)
/

comment on table pb_commsocial_detail is
'�Ƽ��籣��ϸ'
/

comment on column pb_commsocial_detail.template_id is
'ģ���ʶ'
/

comment on column pb_commsocial_detail.social_security_id is
'��Ŀ��ʶ'
/

/*==============================================================*/
/* Table: pb_commsocial_master                                */
/*==============================================================*/
create table pb_commsocial_master  (
   template_id        INTEGER                         not null,
   province_id        INTEGER,
   city_id            INTEGER                         not null,
   name               VARCHAR2(40),
   description        VARCHAR2(100),
   is_valid           SMALLINT,
   constraint PK_PB_COMMSOCIAL_MASTER primary key (template_id)
)
/

comment on table pb_commsocial_master is
'�Ƽ��籣ģ��'
/

comment on column pb_commsocial_master.template_id is
'��ʶ'
/

comment on column pb_commsocial_master.province_id is
'ʡ��ʶ'
/

comment on column pb_commsocial_master.city_id is
'���б�ʶ'
/

comment on column pb_commsocial_master.name is
'���'
/

comment on column pb_commsocial_master.description is
'˵��'
/

comment on column pb_commsocial_master.is_valid is
'�Ƿ���Ч'
/

/*==============================================================*/
/* Table: pb_company                                          */
/*==============================================================*/
create table pb_company  (
   company_code       VARCHAR2(32)                    not null,
   company_english_code VARCHAR2(200),
   company_chinese_code VARCHAR2(200),
   enterprise_code    VARCHAR2(20),
   company_short_name VARCHAR2(50),
   is_listed          SMALLINT                       default 0,
   company_property   SMALLINT,
   company_type       SMALLINT,
   industry_type      SMALLINT,
   company_url        VARCHAR2(100),
   register_address   VARCHAR2(200),
   bank               VARCHAR2(100),
   bank_account       VARCHAR2(50),
   corporation_representative VARCHAR2(50),
   register_capital   VARCHAR2(10),
   is_valid           SMALLINT,
   address            VARCHAR2(100),
   phone              VARCHAR2(50),
   fax                VARCHAR2(50),
   postcode           VARCHAR2(20),
   link_name          varchar2(20),
   link_phone         VARCHAR2(50),
   link_fax           varchar2(50),
   link_positsion     varchar2(50),
   status             SMALLINT,
   start_date         date,
   end_date           date,
   start_account      integer,
   end_account        integer,
   creator_id         INTEGER,
   create_code        VARCHAR(20),
   create_date        DATE                           default SYSDATE,
   creator_IP         VARCHAR(20),
   modifier_id        INTEGER,
   modifier_code      VARCHAR(20),
   modifier_date      date                           default SYSDATE,
   modifier_IP        VARCHAR(20),
   company_email      VARCHAR2(50),
   constraint PK_PB_COMPANY primary key (company_code)
)
/

comment on table pb_company is
'�ͻ�'
/

comment on column pb_company.company_code is
'�ͻ���ʶ'
/

comment on column pb_company.company_english_code is
'�ͻ�Ӣ�����'
/

comment on column pb_company.company_chinese_code is
'�ͻ��������'
/

comment on column pb_company.enterprise_code is
'��ҵ����'
/

comment on column pb_company.company_short_name is
'�ͻ����'
/

comment on column pb_company.is_listed is
'�Ƿ�����'
/

comment on column pb_company.company_property is
'�ͻ�����'
/

comment on column pb_company.company_type is
'�ͻ�����'
/

comment on column pb_company.industry_type is
'��ҵ���'
/

comment on column pb_company.company_url is
'��˾��ַ'
/

comment on column pb_company.register_address is
'ע���ַ'
/

comment on column pb_company.bank is
'��������'
/

comment on column pb_company.bank_account is
'�����˻�'
/

comment on column pb_company.corporation_representative is
'���˴��'
/

comment on column pb_company.register_capital is
'ע���ʱ�'
/

comment on column pb_company.is_valid is
'�Ƿ���Ч'
/

comment on column pb_company.address is
'��ַ'
/

comment on column pb_company.phone is
'�绰'
/

comment on column pb_company.fax is
'����'
/

comment on column pb_company.postcode is
'��������'
/

comment on column pb_company.link_name is
'jϵ������'
/

comment on column pb_company.link_phone is
'jϵ�˵绰'
/

comment on column pb_company.link_fax is
'jϵ�˴���'
/

comment on column pb_company.link_positsion is
'jϵ��ְ��'
/

comment on column pb_company.status is
'�ͻ�״̬'
/

comment on column pb_company.start_date is
'��������'
/

comment on column pb_company.end_date is
'ͣ������'
/

comment on column pb_company.start_account is
'������'
/

comment on column pb_company.end_account is
'ͣ����'
/

comment on column pb_company.creator_id is
'�����˱��'
/

comment on column pb_company.create_code is
'�������ʺ�'
/

comment on column pb_company.create_date is
'����ʱ��'
/

comment on column pb_company.creator_IP is
'������IP'
/

comment on column pb_company.modifier_id is
'�޸��˱��'
/

comment on column pb_company.modifier_code is
'�޸����ʺ�'
/

comment on column pb_company.modifier_date is
'�޸�ʱ��'
/

comment on column pb_company.modifier_IP is
'�޸���IP'
/

comment on column pb_company.company_email is
'��������'
/

/*==============================================================*/
/* Table: pb_company_linkman                                  */
/*==============================================================*/
create table pb_company_linkman  (
   link_id            integer                         not null,
   link_name          varchar2(20),
   link_phone         VARCHAR2(50),
   link_fax           varchar2(50),
   link_positsion     varchar2(50),
   company_code       VARCHAR2(32),
   link_email         VARCHAR2(50),
   constraint PK_PB_COMPANY_LINKMAN primary key (link_id)
)
/

comment on table pb_company_linkman is
'�ͻ�jϵ��'
/

comment on column pb_company_linkman.link_id is
'jϵ�˱�ʶ'
/

comment on column pb_company_linkman.link_name is
'jϵ������'
/

comment on column pb_company_linkman.link_phone is
'jϵ�˵绰'
/

comment on column pb_company_linkman.link_fax is
'jϵ�˴���'
/

comment on column pb_company_linkman.link_positsion is
'jϵ��ְ��'
/

comment on column pb_company_linkman.company_code is
'�ͻ�����'
/

comment on column pb_company_linkman.link_email is
'jϵ���ʼ�'
/

/*==============================================================*/
/* Table: pb_company_modify                                   */
/*==============================================================*/
create table pb_company_modify  (
   modify_id          INTEGER                         not null,
   field_id           VARCHAR(50),
   field_name         VARCHAR2(50),
   field_value        VARCHAR2(1000),
   is_number          SMALLINT,
   modify_person      INTEGER,
   mdify_date         DATE,
   company_code       VARCHAR2(32),
   constraint PK_PB_COMPANY_MODIFY primary key (modify_id)
)
/

comment on table pb_company_modify is
'�ͻ���Ϣ������ʷ'
/

comment on column pb_company_modify.modify_id is
'��ʶ'
/

comment on column pb_company_modify.field_id is
'�ֶα���'
/

comment on column pb_company_modify.field_name is
'�ֶ����'
/

comment on column pb_company_modify.field_value is
'�ֶ�ֵ'
/

comment on column pb_company_modify.is_number is
'�Ƿ�����'
/

comment on column pb_company_modify.modify_person is
'�޸���'
/

comment on column pb_company_modify.mdify_date is
'�޸�����'
/

comment on column pb_company_modify.company_code is
'�ͻ�����'
/

/*==============================================================*/
/* Table: pb_csnode                                           */
/*==============================================================*/
create table pb_csnode  (
   company_code       VARCHAR2(32),
   company_node       VARCHAR2(32)
)
/

comment on table pb_csnode is
'�ͻ�Ȩ�޶�Ӧ��'
/

comment on column pb_csnode.company_code is
'�ͻ���ʶ'
/

comment on column pb_csnode.company_node is
'�ɲ鿴�ͻ���ʶ'
/

/*==============================================================*/
/* Table: pb_empaccfundcard                                   */
/*==============================================================*/
create table pb_empaccfundcard  (
   employee_id        INTEGER,
   accfundcard_code   VARCHAR2(20),
   is_valid           SMALLINT,
   Effective_Date     DATE
)
/

comment on table pb_empaccfundcard is
'Ա��������ʺű�'
/

comment on column pb_empaccfundcard.employee_id is
'��Ա��ʶ'
/

comment on column pb_empaccfundcard.accfundcard_code is
'��Ա������ʺ�'
/

comment on column pb_empaccfundcard.is_valid is
'�Ƿ���Ч'
/

comment on column pb_empaccfundcard.Effective_Date is
'��Ч����'
/

/*==============================================================*/
/* Table: pb_empbankcard                                      */
/*==============================================================*/
create table pb_empbankcard  (
   bankcard_id        INTEGER                         not null,
   employee_code      INTEGER,
   bank_type          INTEGER,
   bank_id            VARCHAR2(100),
   bank_code          VARCHAR2(30),
   bank_name          VARCHAR2(50),
   is_valid           SMALLINT,
   constraint PK_PB_EMPBANKCARD primary key (bankcard_id)
)
/

comment on table pb_empbankcard is
'Ա�������ʺű�'
/

comment on column pb_empbankcard.bankcard_id is
'��ʶ'
/

comment on column pb_empbankcard.employee_code is
'��Ա��ʶ'
/

comment on column pb_empbankcard.bank_type is
'����'
/

comment on column pb_empbankcard.bank_id is
'��������'
/

comment on column pb_empbankcard.bank_code is
'���п���'
/

comment on column pb_empbankcard.bank_name is
'�˻���'
/

comment on column pb_empbankcard.is_valid is
'�Ƿ���Ч'
/

/*==============================================================*/
/* Table: pb_employee                                         */
/*==============================================================*/
create table pb_employee  (
   company_code       VARCHAR2(32)                    not null,
   employee_id        INTEGER                         not null,
   emp_cs_code        VARCHAR2(50),
   name               VARCHAR2(50),
   base_pay           NUMBER(9,2)                    default 0,
   base_pay_pro       NUMBER(9,2)                    default 0,
   is_valid           SMALLINT                       default 1,
   is_injob           SMALLINT                       default 1,
   join_date          DATE,
   in_jobdate         DATE,
   out_jobdate        DATE,
   gender             SMALLINT,
   country_id         INTEGER,
   province_id        INTEGER,
   nationality        VARCHAR2(10),
   birthday           DATE,
   polity             SMALLINT,
   education_level    SMALLINT,
   id_card_type       SMALLINT,
   id_card_num        VARCHAR2(50),
   contact_tel1       VARCHAR(50),
   contact_tel2       VARCHAR(50),
   contact_tel3       VARCHAR(50),
   resident_type      SMALLINT,
   resident_address   VARCHAR2(200),
   marriage_status    SMALLINT,
   health_status      SMALLINT,
   address            VARCHAR(200),
   postcode           VARCHAR(10),
   service_start      SMALLINT,
   start_workdate     DATE,
   contract_type      SMALLINT,
   data_come          INTEGER                        default 1,
   constraint PK_PB_EMPLOYEE primary key (employee_id)
)
/

comment on table pb_employee is
'Ա������Ϣ��'
/

comment on column pb_employee.company_code is
'�ͻ���ʶ'
/

comment on column pb_employee.employee_id is
'��Ա��ʶ'
/

comment on column pb_employee.emp_cs_code is
'��Ա���'
/

comment on column pb_employee.name is
'����'
/

comment on column pb_employee.base_pay is
'ת�����'
/

comment on column pb_employee.base_pay_pro is
'ת��ǰ����'
/

comment on column pb_employee.is_valid is
'�Ƿ���Ч'
/

comment on column pb_employee.is_injob is
'�Ƿ���ְ'
/

comment on column pb_employee.join_date is
'��ְ����'
/

comment on column pb_employee.in_jobdate is
'ת������'
/

comment on column pb_employee.out_jobdate is
'��ְ����'
/

comment on column pb_employee.gender is
'�Ա�'
/

comment on column pb_employee.country_id is
'���'
/

comment on column pb_employee.province_id is
'ʡ��'
/

comment on column pb_employee.nationality is
'����'
/

comment on column pb_employee.birthday is
'����'
/

comment on column pb_employee.polity is
'������ò'
/

comment on column pb_employee.education_level is
'����̶�'
/

comment on column pb_employee.id_card_type is
'֤������'
/

comment on column pb_employee.id_card_num is
'֤�����'
/

comment on column pb_employee.contact_tel1 is
'jϵ�绰1'
/

comment on column pb_employee.contact_tel2 is
'jϵ�绰2'
/

comment on column pb_employee.contact_tel3 is
'jϵ�绰3'
/

comment on column pb_employee.resident_type is
'��������'
/

comment on column pb_employee.resident_address is
'���ڵ�ַ'
/

comment on column pb_employee.marriage_status is
'����״̬'
/

comment on column pb_employee.health_status is
'����״��'
/

comment on column pb_employee.address is
'jϵ��ַ'
/

comment on column pb_employee.postcode is
'�ʱ�'
/

comment on column pb_employee.service_start is
'����������'
/

comment on column pb_employee.start_workdate is
'�μӹ�������'
/

comment on column pb_employee.contract_type is
'��ͬ����'
/

comment on column pb_employee.data_come is
'���4Դ'
/

/*==============================================================*/
/* Table: pb_empsoccard                                       */
/*==============================================================*/
create table pb_empsoccard  (
   employee_id        INTEGER,
   soccard_code       VARCHAR2(50),
   is_valid           SMALLINT,
   Effective_Date     DATE
)
/

comment on table pb_empsoccard is
'Ա���籣�ʺű�'
/

comment on column pb_empsoccard.employee_id is
'��Ա��ʶ'
/

comment on column pb_empsoccard.soccard_code is
'��Ա�籣����'
/

comment on column pb_empsoccard.is_valid is
'�Ƿ���Ч'
/

comment on column pb_empsoccard.Effective_Date is
'��Ч����'
/

/*==============================================================*/
/* Table: pb_product                                          */
/*==============================================================*/
create table pb_product  (
   product_ID         SMALLINT                        not null,
   product_name       VARCHAR2(50),
   product_type       SMALLINT,
   constraint PK_PB_PRODUCT primary key (product_ID)
)
/

comment on table pb_product is
'��Ʒ��'
/

comment on column pb_product.product_ID is
'��Ʒ����'
/

comment on column pb_product.product_name is
'��Ʒ���'
/

comment on column pb_product.product_type is
'��Ʒ����'
/

/*==============================================================*/
/* Table: pb_productseckey                                    */
/*==============================================================*/
create table pb_productseckey  (
   product_ID         SMALLINT,
   seckey_id          VARCHAR2(32)
)
/

comment on table pb_productseckey is
'��Ʒ��Դ��Ӧ��'
/

comment on column pb_productseckey.product_ID is
'��Ʒ����'
/

comment on column pb_productseckey.seckey_id is
'Ȩ�ޱ�ʶ'
/

/*==============================================================*/
/* Table: pb_province                                         */
/*==============================================================*/
create table pb_province  (
   province_id        INTEGER                         not null,
   province_name      VARCHAR2(40),
   province_code      VARCHAR2(20),
   province_pinyin    VARCHAR2(40),
   province_abbr_pinyin VARCHAR2(10),
   province_english_name VARCHAR2(40),
   is_valid           SMALLINT,
   constraint PK_PB_PROVINCE primary key (province_id)
)
/

comment on table pb_province is
'ʡ�ݱ�'
/

comment on column pb_province.province_id is
'��ʶ'
/

comment on column pb_province.province_name is
'ʡ����'
/

comment on column pb_province.province_code is
'�ټ���'
/

comment on column pb_province.province_pinyin is
'ʡ��ȫƴ'
/

comment on column pb_province.province_abbr_pinyin is
'ʡ�ݼ�ƴ'
/

comment on column pb_province.province_english_name is
'Ӣ����'
/

comment on column pb_province.is_valid is
'�Ƿ���Ч'
/

/*==============================================================*/
/* Table: pb_secgroup                                         */
/*==============================================================*/
create table pb_secgroup  (
   group_code         VARCHAR2(32)                    not null,
   group_name         VARCHAR2(20),
   group_memo         VARCHAR2(20),
   group_supcode      VARCHAR2(32),
   constraint PK_PB_SECGROUP primary key (group_code)
)
/

comment on table pb_secgroup is
'Ȩ����ݷ����'
/

comment on column pb_secgroup.group_code is
'Ȩ�޷������'
/

comment on column pb_secgroup.group_name is
'Ȩ�޷������'
/

comment on column pb_secgroup.group_memo is
'Ȩ�޷���˵��'
/

comment on column pb_secgroup.group_supcode is
'�ϼ�Ȩ�޷������'
/

/*==============================================================*/
/* Table: pb_seckey                                           */
/*==============================================================*/
create table pb_seckey  (
   seckey_id          VARCHAR2(32)                    not null,
   seckey_code        VARCHAR2(20),
   group_code         VARCHAR2(32),
   memo               VARCHAR2(200),
   creator_id         INTEGER,
   create_code        VARCHAR(20),
   create_date        DATE                           default SYSDATE,
   creator_IP         VARCHAR(20),
   modifier_id        INTEGER,
   modifier_code      VARCHAR(20),
   modifier_date      date                           default SYSDATE,
   modifier_IP        VARCHAR(20),
   SECKEY_TYPE        VARCHAR2(20),
   SECKEY_CLASS       VARCHAR2(200),
   SECKEY_NAME        VARCHAR2(50),
   constraint PK_PB_SECKEY primary key (seckey_id)
)
/

comment on table pb_seckey is
'Ȩ����ݱ�'
/

comment on column pb_seckey.seckey_id is
'Ȩ�ޱ�ʶ'
/

comment on column pb_seckey.seckey_code is
'Ȩ�޴���'
/

comment on column pb_seckey.group_code is
'Ȩ�޷������'
/

comment on column pb_seckey.memo is
'Ȩ��˵��'
/

comment on column pb_seckey.creator_id is
'�����˱��'
/

comment on column pb_seckey.create_code is
'�������ʺ�'
/

comment on column pb_seckey.create_date is
'����ʱ��'
/

comment on column pb_seckey.creator_IP is
'������IP'
/

comment on column pb_seckey.modifier_id is
'�޸��˱��'
/

comment on column pb_seckey.modifier_code is
'�޸����ʺ�'
/

comment on column pb_seckey.modifier_date is
'�޸�ʱ��'
/

comment on column pb_seckey.modifier_IP is
'�޸���IP'
/

/*==============================================================*/
/* Table: pb_social_detail                                    */
/*==============================================================*/
create table pb_social_detail  (
   sub_social_security_id INTEGER                         not null,
   in_used            SMALLINT,
   social_security_id INTEGER                         not null,
   start_month        varchar2(10),
   end_month          varchar2(10),
   person_base_max    NUMBER(9,2),
   person_base_min    NUMBER(9,2),
   company_base_max   NUMBER(9,2),
   company_base_min   NUMBER(9,2),
   person_percent_max NUMBER(9,4),
   person_percent_min NUMBER(9,4),
   person_base_default NUMBER(9,2),
   person_percent_default NUMBER(9,4),
   company_base_default NUMBER(9,2),
   company_percent_default NUMBER(9,4),
   company_percent_max number(9,4),
   company_percent_min number(9,4),
   company_precision  smallint,
   person_precision   smallint,
   company_add        number(9,2),
   person_add         number(9,2),
   tax_start          number(9,2),
   is_company_arrears smallint,
   is_person_arrears  smallint,
   creator_id         INTEGER,
   create_code        VARCHAR(20),
   create_date        DATE                           default SYSDATE,
   creator_IP         VARCHAR(20),
   modifier_id        INTEGER,
   modifier_code      VARCHAR(20),
   modifier_date      date                           default SYSDATE,
   modifier_IP        VARCHAR(20),
   constraint PK_PB_SOCIAL_DETAIL primary key (sub_social_security_id)
)
/

comment on table pb_social_detail is
'�籣��Ŀ�ӱ�'
/

comment on column pb_social_detail.sub_social_security_id is
'��ʶ'
/

comment on column pb_social_detail.in_used is
'��ǰ��Ч'
/

comment on column pb_social_detail.social_security_id is
'��Ŀ���ʶ'
/

comment on column pb_social_detail.start_month is
'��ʼ��'
/

comment on column pb_social_detail.end_month is
'��ֹ��'
/

comment on column pb_social_detail.person_base_max is
'���˻�������'
/

comment on column pb_social_detail.person_base_min is
'���˻�������'
/

comment on column pb_social_detail.company_base_max is
'��ҵ��������'
/

comment on column pb_social_detail.company_base_min is
'��ҵ��������'
/

comment on column pb_social_detail.person_percent_max is
'���˱�������'
/

comment on column pb_social_detail.person_percent_min is
'���˱�������'
/

comment on column pb_social_detail.person_base_default is
'���˻����Ƽ�ֵ'
/

comment on column pb_social_detail.person_percent_default is
'���˱����Ƽ�ֵ'
/

comment on column pb_social_detail.company_base_default is
'��ҵ�����Ƽ�ֵ'
/

comment on column pb_social_detail.company_percent_default is
'��ҵ�����Ƽ�ֵ'
/

comment on column pb_social_detail.company_percent_max is
'��ҵ��������'
/

comment on column pb_social_detail.company_percent_min is
'��ҵ��������'
/

comment on column pb_social_detail.company_precision is
'��ҵ��ȷֵ'
/

comment on column pb_social_detail.person_precision is
'���˽�ȷֵ'
/

comment on column pb_social_detail.company_add is
'��ҵ���ӽ��'
/

comment on column pb_social_detail.person_add is
'���˸��ӽ��'
/

comment on column pb_social_detail.tax_start is
'��˰�����'
/

comment on column pb_social_detail.is_company_arrears is
'������ҵ����'
/

comment on column pb_social_detail.is_person_arrears is
'������˲���'
/

comment on column pb_social_detail.creator_id is
'�����˱��'
/

comment on column pb_social_detail.create_code is
'�������ʺ�'
/

comment on column pb_social_detail.create_date is
'����ʱ��'
/

comment on column pb_social_detail.creator_IP is
'������IP'
/

comment on column pb_social_detail.modifier_id is
'�޸��˱��'
/

comment on column pb_social_detail.modifier_code is
'�޸����ʺ�'
/

comment on column pb_social_detail.modifier_date is
'�޸�ʱ��'
/

comment on column pb_social_detail.modifier_IP is
'�޸���IP'
/

/*==============================================================*/
/* Table: pb_social_master                                    */
/*==============================================================*/
create table pb_social_master  (
   social_security_id INTEGER                         not null,
   social_typeid      SMALLINT,
   province_id        INTEGER,
   city_id            INTEGER                         not null,
   show_name          VARCHAR2(80),
   pay_atmonth        varchar2(10),
   pay_frequency      SMALLINT,
   is_valid           SMALLINT                       default 1,
   used_classname     VARCHAR2(80),
   person_precision   smallint                       default 2,
   precision          smallint                       default 2,
   caculate_type      smallint                       default 2,
   person_caculatetype smallint                       default 2,
   taxes              smallint                       default 0,
   memo               varchar2(200),
   IS_ARREARS           varchar2(50)                   default '0',
   creator_id         INTEGER,
   create_code        VARCHAR(20),
   create_date        DATE                           default SYSDATE,
   creator_IP         VARCHAR(20),
   modifier_id        INTEGER,
   modifier_code      VARCHAR(20),
   modifier_date      date                           default SYSDATE,
   modifier_IP        VARCHAR(20),
   constraint PK_PB_SOCIAL_MASTER primary key (social_security_id)
)
/

comment on table pb_social_master is
'�籣��Ŀ��'
/

comment on column pb_social_master.social_security_id is
'��ʶ'
/

comment on column pb_social_master.social_typeid is
'�������'
/

comment on column pb_social_master.province_id is
'ʡ��ʶ'
/

comment on column pb_social_master.city_id is
'���б�ʶ'
/

comment on column pb_social_master.show_name is
'��ʾ���'
/

comment on column pb_social_master.pay_atmonth is
'�����·�'
/

comment on column pb_social_master.pay_frequency is
'֧��Ƶ��'
/

comment on column pb_social_master.is_valid is
'�Ƿ���Ч'
/

comment on column pb_social_master.used_classname is
'������'
/

comment on column pb_social_master.person_precision is
'���˽�ȷֵ'
/

comment on column pb_social_master.precision is
'��ҵ��ȷֵ'
/

comment on column pb_social_master.caculate_type is
'��ҵ���㷽��'
/

comment on column pb_social_master.person_caculatetype is
'���˼��㷽��'
/

comment on column pb_social_master.taxes is
'˰ǰ˰��'
/

comment on column pb_social_master.memo is
'˵��'
/

comment on column pb_social_master.IS_ARREARS is
'�Ƿ����?��'
/

comment on column pb_social_master.creator_id is
'�����˱��'
/

comment on column pb_social_master.create_code is
'�������ʺ�'
/

comment on column pb_social_master.create_date is
'����ʱ��'
/

comment on column pb_social_master.creator_IP is
'������IP'
/

comment on column pb_social_master.modifier_id is
'�޸��˱��'
/

comment on column pb_social_master.modifier_code is
'�޸����ʺ�'
/

comment on column pb_social_master.modifier_date is
'�޸�ʱ��'
/

comment on column pb_social_master.modifier_IP is
'�޸���IP'
/

/*==============================================================*/
/* Table: pb_social_type                                      */
/*==============================================================*/
create table pb_social_type  (
   social_typeid      SMALLINT                        not null,
   social_typename    VARCHAR2(50),
   is_valid           SMALLINT                       default 1,
   social_typecode    VARCHAR2(20),
   constraint PK_PB_SOCIAL_TYPE primary key (social_typeid)
)
/

comment on table pb_social_type is
'�籣���ͱ�'
/

comment on column pb_social_type.social_typeid is
'��ʶ'
/

comment on column pb_social_type.social_typename is
'�籣�������'
/

comment on column pb_social_type.is_valid is
'�Ƿ���Ч'
/

comment on column pb_social_type.social_typecode is
'�籣����ټ���'
/

/*==============================================================*/
/* Table: pb_sysfunction                                      */
/*==============================================================*/
create table pb_sysfunction  (
   function_id        INTEGER                         not null,
   function_code      varchar2(50)                    not null,
   function_name      varchar2(100),
   function_type      SMALLINT,
   function_class     varchar2(1000),
   memo               varchar2(100),
   is_valid           smallint                       default 1,
   segment_order      smallint,
   in_tax             SMALLINT,
   is_add             smallint,
   constraint PK_PB_SYSFUNCTION primary key (function_id, function_code)
)
/

comment on table pb_sysfunction is
'ϵͳ�����'
/

comment on column pb_sysfunction.function_id is
'��ʶ'
/

comment on column pb_sysfunction.function_code is
'�������'
/

comment on column pb_sysfunction.function_name is
'�������'
/

comment on column pb_sysfunction.function_type is
'��������'
/

comment on column pb_sysfunction.function_class is
'ʵ����'
/

comment on column pb_sysfunction.memo is
'˵��'
/

comment on column pb_sysfunction.is_valid is
'�Ƿ���Ч'
/

comment on column pb_sysfunction.segment_order is
'��Ӧ��������'
/

comment on column pb_sysfunction.in_tax is
'�Ƿ��˰'
/

comment on column pb_sysfunction.is_add is
'���������'
/

/*==============================================================*/
/* Table: pb_sysparm_detail                                   */
/*==============================================================*/
create table pb_sysparm_detail  (
   parmitem_id        SMALLINT                        not null,
   parm_id            SMALLINT,
   parmitem_name      VARCHAR(50),
   parmitem_memo      VARCHAR2(200),
   is_used            SMALLINT,
   parmitem_code      VARCHAR(20),
   constraint PK_PB_SYSPARM_DETAIL primary key (parmitem_id)
)
/

comment on table pb_sysparm_detail is
'ϵͳ����ӱ�'
/

comment on column pb_sysparm_detail.parmitem_id is
'ϸ���ʶ'
/

comment on column pb_sysparm_detail.parm_id is
'ϵͳ�����ʶ'
/

comment on column pb_sysparm_detail.parmitem_name is
'ϸ�����'
/

comment on column pb_sysparm_detail.parmitem_memo is
'ϸ��˵��'
/

comment on column pb_sysparm_detail.is_used is
'�Ƿ���Ч'
/

comment on column pb_sysparm_detail.parmitem_code is
'�ټ���'
/

/*==============================================================*/
/* Table: pb_sysparm_master                                   */
/*==============================================================*/
create table pb_sysparm_master  (
   parm_id            SMALLINT                        not null,
   parm_name          VARCHAR(50),
   is_used            SMALLINT,
   parm_memo          VARCHAR2(200),
   bean_name          VARCHAR2(20),
   constraint PK_PB_SYSPARM_MASTER primary key (parm_id)
)
/

comment on table pb_sysparm_master is
'ϵͳ�������'
/

comment on column pb_sysparm_master.parm_id is
'ϵͳ�����ʶ'
/

comment on column pb_sysparm_master.parm_name is
'ϵͳ�������'
/

comment on column pb_sysparm_master.is_used is
'�Ƿ���Ч'
/

comment on column pb_sysparm_master.parm_memo is
'ϵͳ����˵��'
/

comment on column pb_sysparm_master.bean_name is
'bean���'
/

/*==============================================================*/
/* Table: tmp_employee                                        */
/*==============================================================*/
create table tmp_employee  (
   company_code       VARCHAR2(32)                    not null,
   emp_cs_code        VARCHAR2(50),
   name               VARCHAR2(50),
   base_pay           NUMBER(9,2)                    default 0,
   base_pay_pro       NUMBER(9,2)                    default 0,
   is_valid           SMALLINT                       default 1,
   is_injob           SMALLINT                       default 1,
   join_date          DATE,
   in_jobdate         DATE,
   out_jobdate        DATE,
   gender             VARCHAR2(10),
   country_id         VARCHAR2(50),
   province_id        VARCHAR2(50),
   nationality        VARCHAR2(10),
   birthday           DATE,
   polity             VARCHAR2(50),
   education_level    VARCHAR2(50),
   id_card_type       VARCHAR2(50),
   id_card_num        VARCHAR2(50),
   contact_tel1       VARCHAR(50),
   contact_tel2       VARCHAR(50),
   contact_tel3       VARCHAR(50),
   resident_type      VARCHAR2(50),
   resident_address   VARCHAR2(200),
   marriage_status    VARCHAR2(50),
   health_status      VARCHAR2(50),
   address            VARCHAR(200),
   postcode           VARCHAR(10),
   service_start      SMALLINT,
   start_workdate     DATE,
   contract_type      SMALLINT
)
/

comment on table tmp_employee is
'��Ա������ʱ��'
/

comment on column tmp_employee.company_code is
'�ͻ���ʶ'
/

comment on column tmp_employee.emp_cs_code is
'��Ա���'
/

comment on column tmp_employee.name is
'����'
/

comment on column tmp_employee.base_pay is
'ת�����'
/

comment on column tmp_employee.base_pay_pro is
'ת��ǰ����'
/

comment on column tmp_employee.is_valid is
'�Ƿ���Ч'
/

comment on column tmp_employee.is_injob is
'�Ƿ���ְ'
/

comment on column tmp_employee.join_date is
'��ְ����'
/

comment on column tmp_employee.in_jobdate is
'ת������'
/

comment on column tmp_employee.out_jobdate is
'��ְ����'
/

comment on column tmp_employee.gender is
'�Ա�'
/

comment on column tmp_employee.country_id is
'���'
/

comment on column tmp_employee.province_id is
'ʡ��'
/

comment on column tmp_employee.nationality is
'����'
/

comment on column tmp_employee.birthday is
'����'
/

comment on column tmp_employee.polity is
'������ò'
/

comment on column tmp_employee.education_level is
'����̶�'
/

comment on column tmp_employee.id_card_type is
'֤������'
/

comment on column tmp_employee.id_card_num is
'֤�����'
/

comment on column tmp_employee.contact_tel1 is
'jϵ�绰1'
/

comment on column tmp_employee.contact_tel2 is
'jϵ�绰2'
/

comment on column tmp_employee.contact_tel3 is
'jϵ�绰3'
/

comment on column tmp_employee.resident_type is
'��������'
/

comment on column tmp_employee.resident_address is
'���ڵ�ַ'
/

comment on column tmp_employee.marriage_status is
'����״̬'
/

comment on column tmp_employee.health_status is
'����״��'
/

comment on column tmp_employee.address is
'jϵ��ַ'
/

comment on column tmp_employee.postcode is
'�ʱ�'
/

comment on column tmp_employee.service_start is
'����������'
/

comment on column tmp_employee.start_workdate is
'�μӹ�������'
/

comment on column tmp_employee.contract_type is
'��ͬ����'
/

/*==============================================================*/
/* Table: tmp_pay_import                                      */
/*==============================================================*/
create table tmp_pay_import  (
   imp_id             INTEGER
)
/

comment on table tmp_pay_import is
'��ʱн�ʵ����'
/

comment on column tmp_pay_import.imp_id is
'��ʶ'
/

/*==============================================================*/
/* Table: tmp_socail_import                                   */
/*==============================================================*/
create table tmp_socail_import  (
   imp_id             INTEGER
)
/

comment on table tmp_socail_import is
'��ʱ�籣������'
/

comment on column tmp_socail_import.imp_id is
'��ʶ'
/

/*==============================================================*/
/* Table: SYS_FUNCTION                                          */
/*==============================================================*/
create table SYS_FUNCTION
(
  FUNCTIONID   VARCHAR2(32) not null,
  FUNCTIONNAME VARCHAR2(20),
  FUNCTIONCODE VARCHAR2(20),
  IMAGEPATH    VARCHAR2(100),
  LINKADDRESS  VARCHAR2(100),
  HELPADDRESS  VARCHAR2(100),
  PARENTID     VARCHAR2(32),
  ISSHOW       INTEGER not null,
  DISPLAYORDER INTEGER,
  constraint PK_SYS_FUNCTION primary key (FUNCTIONID)
);
-- Add comments to the table 
comment on table SYS_FUNCTION
  is 'ϵͳ���ܲ˵�'
/
-- Add comments to the columns 
comment on column SYS_FUNCTION.FUNCTIONID
  is '���ܱ��'
/
comment on column SYS_FUNCTION.FUNCTIONNAME
  is '�������'
/
comment on column SYS_FUNCTION.FUNCTIONCODE
  is '�������'
/
comment on column SYS_FUNCTION.IMAGEPATH
  is '��ʾͼ��'
/
comment on column SYS_FUNCTION.LINKADDRESS
  is 't�ӵ�ַ'
/
comment on column SYS_FUNCTION.HELPADDRESS
  is '�����ַ'
/
comment on column SYS_FUNCTION.PARENTID
  is '�ϼ����'
/
comment on column SYS_FUNCTION.ISSHOW
  is '�Ƿ���ʾ'
/
comment on column SYS_FUNCTION.DISPLAYORDER
  is '��ʾ˳��'
/

/*==============================================================*/
/* Table: T_TAX                                                 */
/*==============================================================*/
create table T_TAX
(
  TAX_CODE   INTEGER not null,
  TAX_NAME   VARCHAR2(100),
  TAX_DEDUCT NUMBER(9,2),
  TAX_RATE   NUMBER(9,2),
  USED       INTEGER default 1,
  constraint PK_T_TAX primary key (TAX_CODE)
);

/*==============================================================*/
/* Table: T_TAX_ENTRY                                           */
/*==============================================================*/
create table T_TAX_ENTRY
(
  TAX_ENTRY_CODE  INTEGER not null,
  TAX_CODE        INTEGER,
  TAX_LEVEL       INTEGER,
  MIN_AMOUNT      NUMBER(20,8),
  MAX_AMOUNT      NUMBER(20,8),
  TAX_RATE        NUMBER(20,8) not null,
  QUICK_DEDUCT    NUMBER(20,8) not null,
  TAX_RELEASEDATE DATE default SYSDATE not null,
  TAX_ENDDATE     DATE,
  USED            INTEGER default 1 not null,
  constraint PK_T_TAX_ENTRY primary key (TAX_ENTRY_CODE)
);

create trigger tib_cs_emp_dimission before insert
on cs_emp_dimission for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column dis_id uses sequence seq_csemp_dimission
    select seq_csemp_dimission.NEXTVAL INTO :new.dis_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_cs_emplsocial before insert
on cs_emplsocial for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column employee_ss_id uses sequence seq_cs_emplsocial
    select seq_cs_emplsocial.NEXTVAL INTO :new.employee_ss_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_cs_empposition_his before insert
on cs_empposition_his for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column his_id uses sequence seq_cs_empposition_his
    select seq_cs_empposition_his.NEXTVAL INTO :new.his_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_cs_empsocial_result before insert
on cs_empsocial_result for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column employee_ss_id uses sequence seq_cs_empsocial_result
    select seq_cs_empsocial_result.NEXTVAL INTO :new.employee_ss_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_cs_orgchart before insert
on cs_orgchart for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column orgchart_id uses sequence seq_cs_orgchart
    select seq_cs_orgchart.NEXTVAL INTO :new.orgchart_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_cs_orgemp_his before insert
on cs_orgemp_his for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column his_id uses sequence seq_cs_orgemp_his
    select seq_cs_orgemp_his.NEXTVAL INTO :new.his_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_cs_pay_input before insert
on cs_pay_input for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column pay_input_id uses sequence seq_pay_input
    select seq_pay_input.NEXTVAL INTO :new.pay_input_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_cs_social_detail before insert
on cs_social_detail for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column sub_social_security_id uses sequence seq_cs_social_detail
    select seq_cs_social_detail.NEXTVAL INTO :new.sub_social_security_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_excel_interface_detail before insert
on excel_interface_detail for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column ex_sub_interfaceid uses sequence seq_excel_interface_detail
    select seq_excel_interface_detail.NEXTVAL INTO :new.ex_sub_interfaceid from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_excel_public_detail before insert
on excel_public_detail for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column ex_sub_id uses sequence seq_excel_public_detail
    select seq_excel_public_detail.NEXTVAL INTO :new.ex_sub_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_excel_public_type before insert
on excel_public_type for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column ex_publictype uses sequence seq_excel_publictype
    select seq_excel_publictype.NEXTVAL INTO :new.ex_publictype from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_flow_runinfo before insert
on flow_runinfo for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column runinfo_id uses sequence seq_flow_runinfo
    select seq_flow_runinfo.NEXTVAL INTO :new.runinfo_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_pay_class_his before insert
on pay_class_his for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column his_id uses sequence seq_pay_class_his
    select seq_pay_class_his.NEXTVAL INTO :new.his_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_pay_classitem_limitdate before insert
on pay_classitem_limitdate for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column limitdate_id uses sequence seq_pay_classitem_limitdate
    select seq_pay_classitem_limitdate.NEXTVAL INTO :new.limitdate_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_pay_data before insert
on pay_data for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column pay_id uses sequence seq_pay_data
    select seq_pay_data.NEXTVAL INTO :new.pay_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_pay_empdata before insert
on pay_empdata for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column emp_dataid uses sequence seq_pay_empdata
    select seq_pay_empdata.NEXTVAL INTO :new.emp_dataid from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_pay_log before insert
on pay_log for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column pay_logid uses sequence seq_pay_log
    select seq_pay_log.NEXTVAL INTO :new.pay_logid from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_pb_city before insert
on pb_city for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column city_id uses sequence seq_pb_city
    select seq_pb_city.NEXTVAL INTO :new.city_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_pb_company_linkman before insert
on pb_company_linkman for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column link_id uses sequence seq_pb_company_linkman
    select seq_pb_company_linkman.NEXTVAL INTO :new.link_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_pb_company_modify before insert
on pb_company_modify for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column modify_id uses sequence seq_pb_company_modify
    select seq_pb_company_modify.NEXTVAL INTO :new.modify_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_pb_empbankcard before insert
on pb_empbankcard for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column bankcard_id uses sequence seq_bankcard
    select seq_bankcard.NEXTVAL INTO :new.bankcard_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_pb_province before insert
on pb_province for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column province_id uses sequence seq_pb_province
    select seq_pb_province.NEXTVAL INTO :new.province_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_pb_social_detail before insert
on pb_social_detail for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column sub_social_security_id uses sequence seq_social_detail
    select seq_social_detail.NEXTVAL INTO :new.sub_social_security_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_pb_social_type before insert
on pb_social_type for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column social_typeid uses sequence seq_social_type
    select seq_social_type.NEXTVAL INTO :new.social_typeid from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_pb_sysfunction before insert
on pb_sysfunction for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column function_id uses sequence seq_sysfunction
    select seq_sysfunction.NEXTVAL INTO :new.function_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/


create trigger tib_pb_sysparm_detail before insert
on pb_sysparm_detail for each row
declare
    integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;

begin
    --  Column parmitem_id uses sequence seq_pb_sysparm_detail
    select seq_pb_sysparm_detail.NEXTVAL INTO :new.parmitem_id from dual;

--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno, errmsg);
end;
/

